GA4 Internal Promotion Tracking

Get granular tracking of on site promotions users see and click using the built in view_promotion and selection_promotion events in GA4 and Elevar's data attribute tracking.

Promotion Tracking Overview

We spend a great deal of time thinking about external touch points in the user journey (ad touch points like Google Ads, FB etc...). However, most modern e commerce sites have several internal promotional touch points as well. These touch points constitute their own promotion funnel that's worthy of analysis. The most common internal promotion is likely a hero banner with a link to a promoted collection or product. Internal promotions also often appear in other locations on site, for example, a promotional pop up for a related product after an add to cart, or the display of a related collection on a product page. You can view these touch points in the user journey much like you view ad click touch points in a multi channel funnel context, and ask questions like which promotional touch points are most likely to lead to the desired actions on our site.

GA4 has built in events (although not automatically detected) for these interactions, view_promotion and select_promotion. view_promotion occurs when a user views a promotion (visibility) and select_promotion occurs when a user clicks a promotion. Along with the event, you can send the following dimensions about the promotion.

  • creative_name - ex. Summer Sale Promotion - Banner Version 2
  • location_id - ex. Landing Page Hero Banner
  • promotion_name - ex. Summer Sale Promotion
  • promotion_id - ex. A unique id for internal reference

With this information, you can build funnels, exposing information like click through rates and conversion rates on promotions. You can then segment these funnels based on promotion location, creative name, etc... to see which promotions/creatives contribute to the actions that are most important to your user journey. You can extend this through the funnel and examine which promotions show up most frequently in the conversion path, not unlike how you think of ad touch points in the conversion path, and then make optimizations based on the performance of these promotions.

Implementation

There is just one requirement to get these events tracking. On every promotion on the site you'll need to add the following html data attributes to your <a> tags, replacing the quoted text for each attribute with the relevant text for your ads.

<a data-promotion 
data-creative-name="red t shirts" 
data-creative-slot="hero banner" 
data-location-id="home page" 
data-promotion-id="P_12345" 
data-promotion-name="summer sale">

This can be done in several ways:

  1. It can be hardcoded on the site.
  2. You can create a custom section in Shopify for your promotions that includes these fields, and populate them in the customization module in Shopify.
  3. You can use a script to add this information on page load.

Once this data is added to the promotions on your site, view_promotion and select_promotion along with their relevant dimensions, will be auto detected and available for analysis in GA4.

To get started download this container and import it into your GTM web container.