The following document describes how to send SiteSpect WATTS data to GA4 using Google Tag Manager with each page_view event
Step 1: Set up a WATTS Global Site Variation in SiteSpect to populate script variables
Triggers and Search Criteria
Replacement HTML
Notes:
- Under Advanced Settings > Apply Based on Campaign Assignment > Test traffic only (and user is counted)
- SS_LISTCAMPAIGNCOUNTED is the most common macro. See all WATTS macros for more.
- Please work with your SiteSpect Team to determine the best SiteSpect settings and data to send to GA.
Step 2: Create Google Tag Manager Tags and Variables
There are three tags and three variables you need to create.
Tags
- Create a New tag and name it "Google Analytics GA4 Configuration".
Select Google Analytics: GA4 Configuration for the Tag Type
Select Initialization - All Pages for Triggering - Create a New tag and name it "SiteSpect WATTS dataLayer".
Select Custom HTML for the Tag Type
Paste in the script block
Select All Pages for Triggering
- Create the three Variables as shown below prior to creating the final tag.
Create a New tag and name it "SiteSpect WATTS Event".
Select Google Analytics: GA4 Event for the Tag Type
Use the existing Configuration Tag
Set the Event Name to the same as used in the dataLayer
Create an Event Parameter for each. The + icon to the right of the Value column should find each one that was created as a User-Defined Variable
Configure a Trigger to use a Custom Event
Variables
- Create a User-Defined Variable for each of the dataLayer event parameter key names.
Step 3: Create Custom Dimensions in GA4
- Configure > Custom Definitions > Custom Dimensions > Create Custom Dimensions [button]
- Create a Custom Dimension for each Event Parameter
- Type in the Event Parameter (this will be an available field when creating a new Dimension)