Track a simple event using GA4 via Tag Manager

 

WebAlliance uses Google Analytics 4 (GA4) via Tag Manager.  In order to utilize GA4, you must first configure Google Tag Manager (GTM).

GTM allows you to have a centralized place to store third-party scripts in one manageable and efficient location.  It also allows for the transmission of ‘datalayer’ data that can be used to track specific events.  You’ll see a list of events and sample data payloads in our document found at the end of this article.

If you want a simple, affordable alternative to track website stats, we have found that Plausible Analytics is a good fit.  It is easy to configure and use.  You can read more about Plausible at: https://plausible.io/.

Getting Started

You must first create a GA4 Configuration Tag to follow this document exactly.  You can see a complete guide on setting up GA4 (including the Configuration Tag) in our Google Analytics 4 Setup Video and Walkthrough article.  

Once your GA4 Configuration tag is in place, you are ready to begin.

Note that our sample below shows the configuration of a simple event.  This should provide a guide to follow for implementing any other simple events supported by WebAlliance.  Many other options are available with GA4 and GTM; however, those are beyond the scope of this document. 

We recommend seeking out specialized help from a qualified source in completing the setup of GA4.  GA4 is much more complex than the previous Google Analytics. 

Support and configuration of third-party systems, including GA4 and GTM are beyond the scope of our support.  We have created this document to help our customers, however, it is possible and likely that it will become outdated as Google makes changes to its platform.  It is accurate as of April 2023.

Sample Trigger Setup

The following steps walk you through using a simple trigger to track that an event occurred without recording custom data from the event.  To track the details of what was added to the cart, etc, would require implementing custom event tracking which is more complex and shown here.

This example will allow you to track every time an item is added to the cart. 

  1. Go to your configuration tag (Select "Tags" from your Tag Manager home screen), and click on the plus icon to add a new trigger.
  1. Click on the plus icon to create a new trigger.
  1. Provide a name for the new trigger.  We recommend using something that represents the event you are tracking.
  2. Click on the Trigger Configuration area.
  1. Click on "Custom Event" for the trigger type.
  1. Enter an event name.  We recommend using a name that is the same as the event you are tracking.  The complete list of GA4 events WebAlliance supports may be found at the end of this article.
  2. Select "Some Custom Events".
  3.  Make sure "Event" is selected.
  4.  Choose "equals".
  5.  Enter the event name from above.
    NOTE:  The event name must exactly match the event name on the GA4 Events document for the event you are trying to utilize.
  6. Make sure to save.
  1. You should see your trigger displayed in the Triggering panel.
  2. Click "Save" to confirm your changes.
  1. You should see the trigger listed for your tag.
  2. Click the "Submit" button to confirm your changes.
  1. Enter a name for this tag manager change.
  2. Enter a description for this tag manager change.
  3. Click the "Publish" button to submit your changes.