Shopify apps tracking with GA4

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.

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.

The basics

For proper tracking for your Shopify app, we’ll need to set up a few things:

  1. Stream setup
  2. Cross-domain tracking
  3. App listing events
  4. App store searches
  5. Key events

Stream setup

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.

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 and app.supercool.com

Cross-domain tracking

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.

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.

Once set, any user clicking a link from our website to the Shopify app store will have the link decorated with a _gl and parameter.

https://apps.shopify.com/supercool?_gl=123456789_ga_A1B2C3D4E5*abcdefghijkl

App listing events

In the app store, Shopify supports only a basic event for app install clicks:

KeyValue
Event nameAdd App button
Event parameter: event_categoryShopify App Store
Event parameter: event_labelsupercool (the name of the app)

Since this is a key interaction, I recommend setting this event as a Conversion. If you already know the name of the conversion event, you can set it up in advance in GA4. However, since the event name is not standardized (e.g. lowercase snake_case), GA4 will not let you set it up beforehand. Instead, you can only flag it after the event has been recorded in the Events table on the admin.

Conversions with white spaces can’t be saved in GA4
They can be set as conversions using the toggle on the Events table

Since the GA4 tag reports on Automatically collected events, we can set these in the Data Stream we’ve created. These can be used to collect clicks and scrolls within the listing page.

App store searches

The most important collected event is the search that led to the listing page. We can collect that by properly configuring the Site Search collected event.

I recommend using the following settings:

Search Term Query Parametersurface_detail
Additional Query Parameterssurface_inter_position,surface_intra_position,surface_type,locale

This will map the values under the surface_detail parameter as the default Dimension of Search term.

The additional query parameters will be mapped as new custom event parameters you can use as Custom Dimensions.

You can use the table below to set these up:

Dimension name Description Scope Event parameter
Locale The language that the merchant has selected in the Shopify App Store. Event q_locale
Surface inter position The section on the page where the merchant found your app. Event q_surface_inter_position
Surface intra position The position within the section of the page where the merchant found your app. The positions are numbered left to right, top to bottom, starting at 1 Event q_surface_intra_position
Surface type The type of page the merchant came from to get to your app listing. Event q_surface_type

Once the dimensions are collecting data, they will be available in your reports. You can use the Search term dimension in all standard reports or use it alongside the Surface dimensions in a custom report (under the Explore section).

Shopify app store search terms report in GA4

Key events

The final piece of the puzzle is defining the right events to collect. While there are plenty of in-app events you can track, I’ll suggest the basic funnel:

EventEvent parametersNotes
Clicks to the app store from your siteCollected automatically, but I recommend setting it as a distinct eventCollected automatically, but I recommend setting as a distinct event
Add app button on the app’s listing pageCollected automatically
App installationShop name
myshopifyDomain
Shopify plan
Can be set as User scoped parameters
Onboarding complete
PurchasePlan
Value
Doesn’t have to be a full GA4 ecom event

Additional events can also include example offline transactions (e.g. recurring monthly charges).

In addition to these events, I strongly suggest assigning a User ID to shop owners. As they are already in a logged mode, this will greatly improve the accuracy of your tracking.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts