Google Analytics

Note: This is a basic setup guide for Google Analytics. We recommend that you get Littledata - Google Analytics for ReCharge, which has an automated Google Analytics audit and setup for sites using ReCharge, including phone support and reporting.

Adding the tracking code

To add your existing Google Analytics property ID, go to the ReCharge Dashboard and into your Settings menu and select Integrations.

Under the Google Analytics ID field paste in your property ID starting 'UA-'.

You can find your property ID under the Admin .. Property section of your Google Analytics account.

Seeing checkout drop-off

You need to set up a goal funnel in Google Analytics. Be sure to set the destination type to Regular Expression ; when the customer goes from /cart to /r/checkout is when it switches from the Shopify domain to the Recharge domain.

For this to work properly you also need to have the same Google Analytics tracker on your Shopify store:

Marketing attribution

If you want to see which marketing campaigns resulted in paying subscriptions, Google Analytics needs to stitch together the first page of the user journey (which has the campaign UTM tags) with the last page with the payment information. This is easily disrupted, so see troubleshooting steps below.

Using this integration it is possible to see channel and campaign for most of your payments, but to get full attribution, including for repeat subscriptions, you will need Littledata - Google Analytics for ReCharge

Troubleshooting

If you're having trouble seeing the user journey in Google Analytics, check the following:

  • Has the Google Analytics property ID been added in the ReCharge Settings > Integrations section and is it set to the correct Universal vs Legacy type? Shopify stores should be on Universal.
  • Can you see traffic to the checkout pages, but just not the eCommerce conversion tracking? Or is it not showing any traffic at all?
  • Is the eCommerce information missing for all orders, or only some of them?
  • Note: Recurring subscription transactions cannot be included with the standard integration. To do that you'll need Littledata - Google Analytics for ReCharge.

  • Is the checkout URL showing the ga linker parameters? It should look like 235381761.1020253843.1454177660 and appears near the end of the URL. If not, you may have an out-dated version of the ReCharge code and need a quick update.
  • On subscription-cart-footer.liquid around line 41 find:

    checkout_url= "https://checkout.rechargeapps.com/r/checkout?myshopify_domain="+myshopify_domain+"&cart_token="+token<br>
    		

    Replace with:

    try { var ga_linker = ga.getAll()[0].get('linkerParam') } catch(err) { var ga_linker ='' } checkout_url= "https://checkout.rechargeapps.com/r/checkout?myshopify_domain="+myshopify_domain+"&cart_token="+token+"&"+ga_linker;
    		

    Unfortunately this linker will only work if the user clicks on the SUBSCRIBE button within 2 minutes of the product page loading. For more reliable tracking you'll need the Littledata integration

The ReCharge team can only offer limited assistance, as we are not Google Analytics experts. If you want further support, or help with custom reporting, please see Littledata - Google Analytics for ReCharge

Still stuck? How can we help? Still stuck? How can we help?