For most Shopify stores, the Littledata – Google Analytics reporting app automatically adds our tracking script to your shop’s template. However, if your store has a custom template/layout, there will be some cases where our app isn’t able to do this automatically.

Luckily it’s super-easy to resolve this issue by adding a code snippet yourself. Once you add the code, your store will automatically call our tracking script at just the right time. That way we can help you get accurate data across the customer life cycle.

In this quick how-to guide I’ll show you how to add the code snippet.

How to add Littledata Shopify Google Analytics code

How to add the snippet to your shop’s code

1. Edit the code in your Shopify admin

Go to your Shopify Admin > Online Store > Themes > Actions > Edit code.

2. Copy the snippet

Copy the following snippet. (Even though our script has already been added to your store, it still needs to be called for each Layout.)

<!-- Start of Littledata - Fix Google Analytics Script-->
{% include 'LittledataLayer' %}
<!-- End of Littledata - Fix Google Analytics Script -->

3. Paste the snippet

Now paste the snippet in every one of your store’s layouts, just under the <body> tag. In the example below, we’ll paste the snippet in row 77.

4. Save and repeat

After you paste the code, click Save and repeat the steps above for each layout.

Note that you will need to make this change for each layout when you are installing our app, but also when you create another layout for a new campaign. Anytime you create a new layout, just follow the steps above to add the right code snippet.

That’s it! You’re now all set to get a consistent stream of accurate data and intelligent insights for your Shopify store.

Remember that it takes about a week for the new analytics setup to start producing useful reports. If you’ve followed these steps but still have questions, please don’t hesitate to get in touch with our team.

We <3 code. And we’re here to deal with it so you don’t have to 🙂

mm
Bianca

Previously managed Customer Services for the British Council. She’s experienced in customer relations, project management and sales. She has a BA degree in cultural studies. Firm believer in learning new skills and constantly improving herself.

View all posts