This is a guide to how Littledata's Recharge connection works with your Google Analytics setup. We look at which subscription events you can track, how to use Littledata's views and filters in your GA account, and how the integration works behind the scenes.
For information on sending Recharge data to your Segment workspace, see the Shopify to Segment guide (under 'Subscription events').
In addition to the one-off orders tracked automatically by Littledata's Shopify connection, our Recharge connection tracks different types of subscription orders, including first-time subscription orders, recurring orders, and prepaid subscriptions. This helps with both marketing analysis (seeing where subscribers come from) and LTV analysis (seeing where your best subscribers come from, and how their subscriptions evolve over time).
We automatically sets the order affiliation in Google Analytics for all orders coming from Recharge as follows:
Subscription First Order
*Subscription Recurring Order
Subscription Prepaid Order
* For subscriptions in the Shopify checkout, this affiliation is only added once you have authorized Littledata's app to access Recharge.
In Google Analytics 4 you'll need to create an event-scope custom dimension for the affiliation
property to use this in segments or reports.
These events work for Shopify's unified checkout. Read more about unified checkout steps.
When the end customer starts and progresses through the checkout we send events to Google Analytics:
Step | GA4 event name |
---|---|
1 | begin_checkout |
2 | add_shipping _info |
3 | add_payment_info |
These checkout step events contain all the product data, and can be segmented by product, SKU, brand etc - along with any other user dimension in GA.
The trigger for these events are checkout/created and checkout/updated webhooks from Recharge (fully server-side).
See how to configure the checkout funnel in GA and how to use those events for PPC retargeting.
Littledata’s checkout tracking works without the need to add Google Tag Manager or other tracking scripts to the Recharge checkout. This simplifies implementation and reduces the risk that 3rd party scripts will interrupt or intercept sensitive payment details or other data.
Here is an example of a checkout event payload sent to Google Analytics 4:
{
"name": "begin_checkout",
"sent_from": "Littledata server",
"currency": "USD",
"value": 169.95,
"littledata_client_id": "362565843.1666037349",
"params":{
"items":[
{
"item_id": "6572436193342",
"item_name": "White Tee",
"item_brand": "Littledata",
"item_variant": "white / xl",
"item_variant_id": "39391140118590",
"item_sku": "TEE_123",
"item_category": "Tees",
"price": 169.95,
"currency": "USD",
"quantity": 1
}
],
}
}
Littledata sends complete subscription lifecycle events to Google Analytics (or Segment). This helps you understand subscriber growth and customer behavior in more detail.
The connection automatically adds tracking for the following events:
Read the full guide to tracking subscription lifecycle events in Google Analytics (and GA4) with Littledata. The guide includes details about event naming conventions in Segment and Google Analytics.
All the steps needed in tracking and linking the customer journey on a Headless storefront are highlighted in our Headless Demo.
Depending on the destination of the data, there is a selection of identifiers that need to be passed onto the checkout order_attributes via the Recharge checkout API.
With the Recharge connection, you can distinguish between three types of order:
Shopify
) standard one-off orders through your Shopify checkoutSubscription, Subscription First Order
): first-time subscription orders made via RechargeSubscription, Subscription Recurring Order
): recurring subscription orders made via RechargePrepaid, Subscription, Subscription Recurring Order
) recurring subscription orders made via Recharge that are paid in advance for a fixed period of time, usually 6 or 12 months.Learn more about how to segment orders using the 'Affiliation' dimension in Google Analytics.
When you create a subscription product for your store, Recharge creates a secondary product containing the subscription criteria (delivery frequency, discounts, etc.). This is a clone of your one-time product with the addition of subscription offerings.
The one-time and subscription products will look something like this:
In order to have a consistent product reporting, it is crucial to have a matching SKU for a product that has both a subscription and non-subscription alternative, and their respective variants.
If the SKUs match, you will see this in your Product Performance reports:
Instead of this:
Doing this will ensure the presence of one-time and subscription products under the same product umbrella in your reports, resulting in a consistent and accurate representation of how your products are performing.
Littledata makes a server-side integration between Shopify and Google Analytics. Every time an order is processed on Shopify, Littledata links that revenue to the user in Google Analytics (as stored in the _ga
cookie). To link orders to users, Littledata needs to add the customer’s client ID to the note attributes of the order; that will appear in your Shopify admin, but is not visible to customers.
If our app cannot find a user session associated with the order — for example, when the subscriber signed up before you installed Littledata’s tracking — we add a default client ID. You can still link all these ‘orphan’ user sessions together via the Shopify customer ID
dimension.