Skip to main content

GA4 Revenue Tracking Through Events​

Why​

This is an optional step to track revenue generated though Theca​.

Used for source = target (internal results)​.

In short:​

  1. Add a view_item_list for every search​
  2. When the products have been populated in the view send view_promotion event​
  3. When a product is clicked send a select_promotion event​

Attribution rule is "last click".​

Step 1: view_item_list​

Implementing the view_item_list event in GA4 using Google Tag Manager (GTM) for an e-commerce site involves several steps:​

  1. Set Up GA4 Configuration Tag in GTM:​
  • Create a new tag in GTM for the GA4 Configuration.​
  • Enter your GA4 Measurement ID (found under "Admin" > "Data Streams" in your GA4 account).​
  • Set the tag to trigger on all pages.​
  1. Implement Data Layer on Your E-commerce Site:​
  • Create GA4 Event Tags for E-commerce Events:​
  • In GTM, set up a new GA4 Event tag.​
  • Specify the event name (view_item_list) and the necessary parameters such as items, item_list_id, and item_list_name which should be pulled from the dataLayer.​
  • Link this event tag to the GA4 Configuration Tag to ensure the data is sent to the correct GA4 property.​
  • Choose the appropriate trigger for this tag to fire, such as when a user views a list of items on a page.​
  1. Testing and Publishing:​
  • Test the entire setup in GTM's preview mode to make sure everything is working as intended.​
  • Once tested, publish the changes to make the event tracking go live.​
  1. Verification in GA4:​
  • Use GA4's debug view to verify the view_item_list event is firing with the correct parameters.​
  • Also, check the real-time reporting section in GA4 to confirm the data is coming through as expected.​

Each of these steps ensures that user interactions with item lists on your e-commerce site are captured and sent to GA4, where they can be analyzed to gain insights into user behavior and preferences.​

note

For a detailed step-by-step guide and to ensure accurate implementation, you should refer to specific resources dedicated to GA4 and GTM, such as those provided by Simo Ahava's blog, Tracking Academy, and OWOX​ (Simo Ahava's blog)​​ (TrackAcademy)​​ (owox)​.​

Step 2 & 3: view_promotion and select promotion​​

To implement the view_promotion event in GA4 using Google Tag Manager (GTM) after setting up view_item_list, you will follow a similar process but with a focus on the promotional elements of your e-commerce site. Here’s a high-level overview of the steps you would need to take:​

  1. Create a Custom JavaScript Variable in GTM: This variable will hold the details of the promotions in the items array, including parameters like promotion_id, promotion_name, creative_name, creative_slot, and location_id.​

  2. Set Up a GA4 Event Tag for view_promotion:​

  • In GTM, create a new GA4 event tag and configure it by selecting your GA4 configuration tag or adding the measurement ID manually.​
  • Set the event name to view_promotion.​
  • In the tag configuration, enable Ecommerce data to be sent and choose the Custom JavaScript variable you created as the Ecommerce Object.​
  1. Create a Promotion Visibility Trigger:​
  • This trigger is based on when the promotional element becomes visible on the screen. You can use the Element Visibility trigger type and set criteria like the percentage of the element's visibility and how often it should fire (once per page, for example).​
  1. Test and Preview: Before making the tag live, use GTM's preview mode to ensure it is firing correctly when the conditions are met.​

  2. Deploy: After testing and confirming that the tag works as expected, publish your changes in GTM.​ For the select_promotion event, which tracks clicks on promotions, you would duplicate the view_promotion setup but with the following differences:​

  • Modify the Custom JavaScript variable and the event tag to use the select_promotion event name.​
  • Set up a click-based trigger that fires the select_promotion event when a user interacts with the promotion, using the Click – All Elements trigger type in GTM.​

Remember, it is important to ensure that the parameters and variables match your site's specific setup and that you have configured the dataLayer correctly to pass the required information.​

note

For a detailed step-by-step guide and to ensure accurate implementation, you should refer to specific resources dedicated to GA4 and GTM, such as those provided by Simo Ahava's blog, Tracking Academy, and OWOX​ (Simo Ahava's blog)​​ (TrackAcademy)​​ (owox)​.​