Getting started: Shopify to Google Analytics connection

Updated on 2021-12-22

In this quick setup guide, we'll show you how to find and install Littledata Analytics, the most popular Shopify app for ecommerce tracking and marketing attribution in Google Analytics (GA).

note:

Littledata's Shopify connection does not change historic data in GA, and it only fixes tracking from the time of install onwards.

Quick install guide

Step 1. On your Shopify store page, select apps on the left-hand side. There you will see the Recommended Apps button. Select Find more apps in the Shopify App Store.

Step 2. Type in Littledata into the search bar.

Step 3. Once you've typed it in click 'Add app'  to begin the installation process:

Step 4. Install the app.

A) Automatic Install

1. Choose the installation type you wish to follow; if you choose the Automatic route, please continue reading below. For the Manual route, follow the instructions listed in section B) Manual Install:

2. Select the source you want to send the data to. You have the option of sending it to Universal Analytics or Universal Analytics and Google Analytics 4. For the GA4 route, follow the instructions listed in section C) GA4 Install:

  1. Add your Google Analytics web property ID by following the in-app instructions:

4. After completing this step, you will have to disable the Shopify tracker:

tip:

Your Google Analytics field in Shopify admin looks like this:

disable the Shopify tracker

5. Your setup is now complete!

note:

To enhance Shopify tracking, we suggest you use our Google Analytics connection after completing the Shopify set up. The instructions for connecting Google Analytics can be found in this guide.

B) Manual Install

1. Select the Manual route. If you are running a headless setup, follow the instructions listed in section D) Headless Install:

2. Select the source you want to send the data to. You have the option of sending it to Universal Analytics or Universal Analytics and Google Analytics 4.

Add your Google Analytics web property ID/Measurement ID + API Secret by following the in-app instructions:

3. Next, you will be instructed to add the script to your Shopify theme. Click the COPY link, which will copy the script to the clipboard:

4. Then go to your Shopify admin > Online Store > Themes > Actions > Edit code and create a new snippet named LittledataLayer.liquid ; then paste the script in and click on save.

5. Copy the 3 line code and paste in every one of your store’s layouts to include the snippet, just above the**</head>** tag. In the example below, we’ll paste the snippet in row 75.

note:

You need to add the three-line code to your layouts 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 these steps to add the code snippet.

6. After adding the code, you will be prompted to disable the current Shopify tracker in order to prevent duplicate tracking:

7. Your setup is now complete!

C) GA4 Install

1. Choose the installation type you wish to follow; if you choose the Standard route, please continue reading below:

2. Select the source you want to send the data to. Select Universal Analytics and Google Analytics 4:

3. Add your Google Analytics web property ID and GA4 measurement ID by following the in-app instructions:

4. After completing this step, you will have to disable the Shopify tracker:

5. Your setup is now complete!

D) Headless Install

1. Choose the installation type you wish to follow:

2. Select the source you want to send the data to:

3. Add your Google Analytics web property ID and/or GA4 measurement ID by following the in-app instructions:

4. After completing this step, you will have to disable the Shopify tracker:

5. Visit headlessdemo.littledata.io and complete steps 2 to 5. The steps are listed below for your reference:

You're all set: