{"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
  1. Stream setup<\/li>\n\n\n\n
  2. Cross-domain tracking<\/li>\n\n\n\n
  3. App listing events<\/li>\n\n\n\n
  4. App store searches<\/li>\n\n\n\n
  5. 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

    https:\/\/apps.shopify.com\/supercool?_gl=123456789_ga_A1B2C3D4E5*abcdefghijkl<\/a><\/p>\n\n\n\n

    App listing events<\/h2>\n\n\n\n

    In the app store, Shopify supports only a basic event for app install clicks:<\/p>\n\n\n\n

    Key<\/strong><\/td>Value<\/strong><\/td><\/tr>
    Event name<\/td>Add App button<\/td><\/tr>
    Event parameter: event_category<\/td>Shopify App Store<\/td><\/tr>
    Event parameter: event_label<\/td>supercool (the name of the app)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

    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.<\/p>\n\n\n

    \n
    \"\"
    Conversions with white spaces can’t be saved in GA4<\/figcaption><\/figure><\/div>\n\n
    \n
    \"\"
    They can be set as conversions using the toggle on the Events table<\/figcaption><\/figure><\/div>\n\n\n

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

    \n
    \"\"<\/figure><\/div>\n\n\n

    App store searches<\/h2>\n\n\n\n

    The most important collected event is the search that led to the listing page. We can collect that by properly configuring the Site Search<\/em> collected event.<\/p>\n\n\n\n

    \"\"<\/figure>\n\n\n\n

    I recommend using the following settings:<\/p>\n\n\n\n

    Search Term Query Parameter<\/strong><\/td>surface_detail<\/td><\/tr>
    Additional Query Parameters<\/strong><\/td>surface_inter_position,surface_intra_position,surface_type,locale<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

    This will map the values under the surface_detail parameter as the default Dimension of Search term<\/em>.<\/p>\n\n\n\n

    The additional query parameters will be mapped as new custom event parameters you can use as Custom Dimensions.<\/p>\n\n\n\n

    \"\"<\/figure>\n\n\n\n

    You can use the table below to set these up:<\/p>\n\n\n

    \n\n\n\n\n\n\n\n
    Dimension name<\/strong><\/td>\nDescription<\/strong><\/td>\nScope<\/strong><\/td>\nEvent parameter<\/strong><\/td>\n<\/tr>\n
    Locale<\/td>\nThe language that the merchant has selected in the Shopify App Store.<\/td>\nEvent<\/td>\nq_locale<\/td>\n<\/tr>\n
    Surface inter position<\/td>\nThe section on the page where the merchant found your app.<\/td>\nEvent<\/td>\nq_surface_inter_position<\/td>\n<\/tr>\n
    Surface intra position<\/td>\nThe 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<\/td>\nEvent<\/td>\nq_surface_intra_position<\/td>\n<\/tr>\n
    Surface type<\/td>\nThe type of page the merchant came from to get to your app listing.<\/td>\nEvent<\/td>\nq_surface_type<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n

    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).<\/p>\n\n\n

    \n
    \"\"
    Shopify app store search terms report in GA4<\/figcaption><\/figure><\/div>\n\n\n

    Key events<\/h2>\n\n\n\n

    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:<\/p>\n\n\n\n

    Event<\/strong><\/td>Event parameters<\/strong><\/td>Notes<\/strong><\/td><\/tr>
    Clicks to the app store from your site<\/td>Collected automatically, but I recommend setting it as a distinct event<\/td>Collected automatically, but I recommend setting as a distinct event<\/td><\/tr>
    Add app button on the app’s listing page<\/td><\/td>Collected automatically<\/td><\/tr>
    App installation<\/td>Shop name
    myshopifyDomain
    Shopify plan<\/td>
    Can be set as User scoped parameters<\/td><\/tr>
    Onboarding complete<\/td><\/td><\/td><\/tr>
    Purchase<\/td>Plan
    Value<\/td>
    Doesn’t have to be a full GA4 ecom event<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

    Additional events can also include example offline transactions (e.g. recurring monthly charges).<\/p>\n\n\n\n

    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.<\/p>\n","protected":false},"excerpt":{"rendered":"

    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","protected":false},"author":1,"featured_media":5702,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/5685"}],"collection":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/comments?post=5685"}],"version-history":[{"count":12,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/5685\/revisions"}],"predecessor-version":[{"id":5714,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/5685\/revisions\/5714"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/media\/5702"}],"wp:attachment":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/media?parent=5685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/categories?post=5685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/tags?post=5685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}