Supported Event Types

You can track purchase events using either Tag Manager or Measurement Protocol:

  • For client-side tracking, use Google Tag Manager (GTM) for a user-friendly and quick setup.
  • For server-side tracking, opt for the Measurement Protocol.

It’s crucial to choose one method to ensure data accuracy and consistency.

In this guide, we will explain how to set up GA4 e-commerce tracking using Google Tag Manager. For instructions on using the Measurement Protocol, refer to Google’s documentation or check it here.

Setting Up GA4 Ecommerce Tracking with Google Tag Manager

Use Google Tag Manager for client-side tracking. This method helps ensure that 'purchase' events are accurately recorded without being affected by ad or cookie blockers, and avoids the need for additional script tags. Upmind push the following recommended GA4 events:

  • view_item
  • purchase
  • remove_from_cart
  • add_payment_info
  • add_to_cart
  • sign_up

Additionally, we push these 1st party events (all prefixed with upmind.):

  • upmind.logout
  • upmind.actor_identified
  • upmind.modal_open

To send e-commerce transactions to Google Analytics, you need to add tags and triggers on Google Tag Manager that will fire Google Analytics tags for all of the recommended e-commerce events. This will help us to collect the data when people view items, add items to their cart begin to checkout, complete their purchase, and other e-commerce actions.

Here are the recommended triggers you should add to your Google Tag Manager:

Triggers NameEvent Type
GA4 add_payment_infoCustom Event
GA4 add_to_cartCustom Event
GA4 loginCustom Event
GA4 purchaseCustom Event
GA4 remove_from_cartCustom Event
GA4 sign_upCustom Event
GA4 view_itemCustom Event
UPM actor_identifiedCustom Event
UPM logoutCustom Event
UPM modal_openCustom Event

While there are the recommended tags you should create in your Google Tag Manager:

Tags NameTypeFiring Triggers
GA4 Event 'add_payment_info'Google Analytics: GA4 EventGA4 add_payment_info
GA4 Event 'add_to_cart'Google Analytics: GA4 EventGA4 add_to_cart
GA4 Event 'login'Google Analytics: GA4 EventGA4 login
GA4 Event 'purchase'Google Analytics: GA4 EventGA4 purchase
GA4 Event 'sign_up'Google Analytics: GA4 EventGA4 sign_up
GA4 Event 'view_item'Google Analytics: GA4 EventGA4 view_item
GA4 Event 'remove_from_cart'Google Analytics: GA4 EventGA4 remove_from_cart
UPM Event 'upm_actor_identified'Google Analytics: GA4 EventUPM actor_identified
UPM Event 'upm_logout'Google Analytics: GA4 EventUPM logout
UPM Event 'upm_modal_open'Google Analytics: GA4 EventUPM modal_open

You might refer to the steps below for e-commerce tracking and creating triggers and tags for Google Tag Manager:

Step 1: Creating GA4 Property

  1. Log in to your Google Analytics account using your Google account. If you don't have a Google account, create one first.
  2. Click on Admin and select Property.
  1. Go to Property Details. Enter a property name, select the industry category, and add your reporting time zone and currency.
  2. Click Create.

Step 2: Creating Triggers in Google Tag Manager

  1. Log in to your Google Tag Manager account and select the container name you want to connect with Google Analytics.
  2. Click on Triggers in the left-hand menu.
  3. Click on New.
  4. Set the Trigger Configuration to Custom Event. For the Event Name, enter one by one the recommended GA4 events.
  1. Click Save. Repeat these steps to add all recommended trig4gers up to UPM modal_open.

Step 3: Creating Tags in Google Tag Manager

  1. In the left-hand menu, click on Tags.
  2. Click on New to create a tag that sends data to Google Analytics for each trigger you’ve set up.
  3. Enter the Google Measurement ID from Google Analytics and input each recommended GA4 event name one by one.
  4. Under More Settings, make sure to check the box for Send E-commerce Data and select Data Layer as the data source. This will ensure that all e-commerce information pushed to the data layer, including value, item, and other details, is automatically sent to Google Analytics.
  5. Choose the triggering option based on the recommended events. For example, if the trigger event name is add_payment_info, then the trigger should be GA4 add_payment_info.
  1. Click Save. Repeat these steps to add all recommended tags up to UPM Events 'upm_modal_open'.

Step 4: Review, Test and Publish

  1. Review your triggers and tags to ensure they are correctly configured.
  1. Use Preview mode to test your setup, then click Submit to make the tag live.
  1. Add a version name and description (e.g. GA4 Purchase Event Setup).
  2. Click Publish.

Step 5: Adding Google Tag Manager and Google Analytics Credentials to Upmind

  1. Login to your Upmind account.
  2. Go to Settings and find Analytics and Tracking.
  3. Enter your GTM Container ID, Google Measurement ID, and API Secret in the appropriate fields.

You can test it by making a purchase on your Upmind store. Your Google Analytics will then display the data.

This is an example of how the data looks

This is an example of how the data looks