Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleWithout GTM: gtag.js

Expand
titleWith Shopify + Google Analytics 4

First, ensure that your Shopify site is properly connected to your Google Analytics account.


In your Shopify admin, go to Online Store > Preferences, then locate the Google Analytics section. Click on Manage Pixel.
The configuration should look similar to the following screenshot (in French):

Image Added

Go to Adloop and copy-paste the script.

Go to your Adloop space, and go to the settings of your Adloop Tracking & Attribution data-source.

Once your setup is complete, go to the step “JS file and collect - Generate the script”, and use the button Copy in clipboard”.

Image AddedImage Added

In your Shopify administration, go to Online Store > Themes, then in the section for your current theme, click the button to the left of Customize (…), and select Edit Code.

Image Added

Select the theme.liquid file and locate the closing </head> tag.

Just before the tag </head>, paste the code you copied in the previous step.

Verification

Once the setup is complete, here’s how to check if everything is working correctly.

  1. No JavaScript errors in the browser’s developer console (F12),

  2. Search for your website on Google and click on one of the links. Check that a “loop_num” cookie has been created. The value should look like: 

b3523d6c-4f6b-40b2-ff18-61d1c046d67:AHK7n4|IN|site.com”.

  1. In the “collect” request sent to Google during the page_view, check that the custom dimension is correctly populated.

Image Added

  1. 24 hours later, you should see custom dimension values appear in the Google Analytics interface.

    Image Added

The verification of the script is very easy and will take only a couple of minutes.

...