Google Ads & GA4 Tracking in Shopify

Google Ads & GA4 Tracking in Shopify

I used to like GTM but if you want the tags to fire in checkout (you do) then you need to use the Shopify method of inserting the tracking tags. As of March Shopify finally support GA4 through the Google channel app.  You can also use the Google app to link to the merchant centre but it's crap. There is no real options to update in bulk or filter products.

There are other manual methods and apps to insert the GA4 tracking code, but I like to use Shopify apps where possible as I hope they are better developed and also have access to checkout (which you don't unless you pay for Shopify pro)

Side note, to link to the merchant centre with a nice API connection I use Simprosys Google Shopping Feed fed by my CSS, which also labels products hero, sidekick, villain or zombie based on their ROAS.

Merchant centre feed management in Shopify with Simprosys Google Shopping Feed

Add GA4 to Shopify

Install the Google channel app in Shopify and connect it to GA4

Link the GA4 tag any other tags in Google Ads

Check in GA4 for some events such as purchase and add_to_cart. Realtime should show them straight away, the reports for me lag 24 hours.

Remove any old tags

Turn off any tracking in Simporosys

Remove the UA tag from in Shopify Online Store -> Preferences

Remove any other tags from Shopify, such as in <head> in theme.liquid

Check what tags are firing

Check that everything is working correctly and only the GA4 container tag is being loaded using code inspector, Tag Assistant or run an audit like Page Speed which will flag duplicate js.

Create the conversions in Google Ads

In Ads Tools -> Linked accounts create the GA4 linked account

And then activate it

Analytics Admin -> Events I marked the add_to_cart event as a conversion so I can use it in Ads. Shopify say there there are default events for begin_checkout and add_payment_info but I haven't seen them yet...

And in Analytics Admin -> Audiences create the default audiences

Then in Ads -> Tools -> Conversions create a new conversion and import from GA4 web

You should have at least a purchase and add to cart conversion. Leave the old conversion in while the new one accumulates conversions.

It sucks that GA4 is so lagged compared to UA, or at least it is for me. UA is near realtime, whereas GA4 is a day behind with conversions.

In Admin -> Stream Settings you can connect the old UA tag through GA4 so it still loads and processes data. This is useful to leave UA recording until a set date like the end of a month for cleaner reporting.

ecommerce conversion science

Get a free digital audit

See how I can help grow your ecommerce business - I will audit your website, PPC and digital marketing and provide a free report with actionable insights.
Prefer to book a meeting?