{"id":5685,"date":"2023-08-03T00:12:35","date_gmt":"2023-08-02T21:12:35","guid":{"rendered":"https:\/\/trackingchef.com\/?p=5685"},"modified":"2023-08-06T09:18:54","modified_gmt":"2023-08-06T06:18:54","slug":"shopify-apps-tracking-with-ga4","status":"publish","type":"post","link":"https:\/\/trackingchef.com\/google-analytics\/shopify-apps-tracking-with-ga4\/","title":{"rendered":"Shopify apps tracking with GA4"},"content":{"rendered":"\n
With the release of GA4 (July 2023), many platforms using GA as their main tracking infrastructure have adjusted their products to use GA4. In some cases, as with Shopify’s App Listings, the platform tried to “force” the GA3 logic on GA4 events instead of investing the extra effort to properly utilize the benefits GA4 offers.<\/p>\n\n\n\n
In this post, I’ll try to share some advice on how you can make the most of your GA4 tracking on your Shopify App and App Store Listing page in spite of this.<\/p>\n\n\n\n
The basics<\/h2>\n\n\n\n
For proper tracking for your Shopify app, we’ll need to set up a few things:<\/p>\n\n\n\n
\n
Stream setup<\/li>\n\n\n\n
Cross-domain tracking<\/li>\n\n\n\n
App listing events<\/li>\n\n\n\n
App store searches<\/li>\n\n\n\n
Key events<\/li>\n<\/ol>\n\n\n\n
Stream setup<\/h2>\n\n\n\n
When working with GA4 you can create multiple Data Streams under a single property to capture data from various sources. Most websites will use a single stream, but in this case, since we have distinct domains and platforms, using a separate stream for the Website\/App and the app losing makes perfect sense.<\/p>\n\n\n\n
<\/figure>\n\n\n\n
Note that the app and marketing site uses a single stream to minimize data discrepancies. This assumes that they both use the same domain, e.g. www.supercool.com<\/em> and app.supercool.com<\/em><\/p>\n\n\n\n
Cross-domain tracking<\/h2>\n\n\n\n
Your user’s journey begins, well, somewhere. It might very well be that a large portion of users will find your app directly via the app store, but many might start that funnel elsewhere, for example on your website. In this case, we’ll want to persist the user’s Client ID assigned by Google Analytics so that the attribution data carries over.<\/p>\n\n\n
\n
<\/figure><\/div>\n\n\n
To achieve this we need to add both our company’s domain and the Shopify app store domain as tracked domains in the Data Streams created.<\/p>\n\n\n\n
<\/figure>\n\n\n\n
Once set, any user clicking a link from our website to the Shopify app store will have the link decorated with a _gl<\/em> and parameter.<\/p>\n\n\n\n