Overview
These integration instructions provide the details about how to send Terminus web experiences events into GA4 via the Data Layer using Google Tag Manager.
Note: This is the recommended method for GA4 reporting if GA4 has been installed using Google Tag Manager and GTM is being used to control and route events
The integration between Terminus Web Experiences and GA4 requires configuration in both platforms. We will cover both set-ups below:
Part 1. Configure the GA4 Connection within Terminus Web Experiences
To begin, navigate to the connections screen by selecting the appropriate option in the left-side menu.
Once the connection library opens, hover over the GA4 connection until you see the “INSTALL” button. Click that button
When the GA4 connection opens, you will see a screen with 5 fields that you will need to address as follows:
- Connection Name: Give your GA4 Connection a name. We recommend the naming convention: “Company Name GA4 Instance” However, any name will work.
- Make sure that the the “Enable Event Tracking” toggle is on (the blue circle should be on the right side of the toggle button)
- Select “Send Events to Data Layer (Google Tag Manager)” from the dropdown.
- By default, the data layer name will be set to the standard “dataLayer”. If you use something different, put your specific data layer name in the appropriate field.
- By default, all events will be sent with the “webex_” prefix. If you want to change that to something custom, you can do so here.
- Note: The prefix will be a critical part of the configuration within Google Tag Manager so ensure that whatever you select is constant and is not something that you will change in the future.
- The “Send To” field can just be set to “default” for the majority of cases. However, if you have multiple instances of GA4, you can use this field to specify the one to which you’d like to send Terminus Web Experiences events
Once you have completed the 5-step configuration, click “Save Connection”
This completes the Web Experiences portion of the GA4 set-up.
Part 2. Configure Google Tag Manager
Confirm the GA4 Measurement ID variable (or create it, if it doesn’t yet exist)
Most GTM instances will already have a variable for the GA4 Measurement ID created. This is a best practice recommended by GA4.
To confirm, navigate to the “Variables” screen from the menu on the left. In the section for User-Defined Variables, look for a Constant Type user defined variable that looks like this:
If this variable already exists, go ahead and skip to the “Confirm GA4 Configuration Tag” section below.
If you do not have an existing GA4 Measurement ID, you will need to do the following:
- Select “New” from the top right of the User-Defined Variables section to open a new variable template
- Name your variable “GA4 Measurement ID”
- Click on the configuration canvas and select “Constant” from the Utilities section
- To find the value for your GA4 Measurement ID, you will need to go to your GA4 account:
- In the admin of your GA4, select Data Streams
-
- Once in the data streams, navigate to the Web option and click on the web stream where you will be running GA4 and sending Terminus Web Experience events
-
- Once you select the appropriate web stream, you will see the associated details including the Measurement ID.
-
- Copy this value and return to the GTM configuration screen. Your GA4 Measurement ID variable should now look like this:
-
- Save the variable
Confirm the GA4 Configuration tag (or create it, if it doesn’t yet exist)
Most GTM instances will already have a tag for the GA4 Configuration created. This is a best practice recommended by GA4.
To confirm, navigate to the “Tags” screen from the menu on the left. Look for a GA4 Configuration tag (or something similarly named) that is set to fire on all pages. It will look something like this:
If this tag already exists, go ahead and skip to the “Create the Web Experiences Variables” section below.
If you do not have an existing GA4 Configuration tag, you will need to do the following:
- Select “New” from the top right of the Tags section to open a new tag template
- Name your tag “GA4 Configuration”
- Click on the Tag Configuration canvas. For the Tag Type, select “Google Analytics: GA4 Configuration”
- In the Measurement ID field, which will appear, click on the icon that looks like a lego and select the GA4 Measurement ID variable from the available list. Your Tag Configuration canvas should now look like this:
- Next, click into the “Trigger” canvas below.
- Select the “All Pages” trigger
- Your GA4 Configuration tag should now look like this:
- Save the tag
Create the Web Experiences Variables
To begin, you will need to create 4 new User-Defined Variables for the following:
- Web Experiences Campaign
- Web Experiences Rule
- Web Experiences Segment
- Web Experiences Content
These 4 variables each correspond to the 4 properties associated with a particular personalized experience: (1) The campaign that experience was part of, (2) the rule that delivered the experience, (3) the segment that the visitor matched to trigger the experience, (4) the content that was shown
To create each of these variables, follow these steps:
Step 1: Click the "Variables" option in the left side navigation of the Google Tag Manager interface.
Step 2: Scroll to the "User-Defined Variables" section and select "New" to create a new variable.
Step 3: Name your variable “Web Experiences Campaign”
Step 4: In the variable configuration canvas, select the variable type of "Data Layer Variable"
Step 5: Complete the template as shown below:
- Note: It is very important to pay attention to the value that you enter into the “Data Layer Variable Name” field. This is case sensitive. Additionally, if you created a different prefix when configuring the GA4 connection within Terminus Web Experiences, you will need to use that prefix here in place of “webex_”
Step 6: Save the new variable
Repeat Steps 1-6 for the Web Experiences Rule, Web Experiences Segment, and Web Experiences Content variables.
Once complete you should have 4 new User-Defined Variables that appear in your variables list as in the image below:
Create the Web Experiences Triggers
Next, you will need to create three Web Experiences triggers that correspond to specific events associated with personalization. These events are impressions, clicks, and actions.
To begin, select “Triggers” from the menu on the left and follow the steps below:
Step 1: In the top right corner, select the "New" button to begin your trigger configuration
Step 2: Name your trigger “Web Experiences Event - Action”
Step 3: In the trigger configuration canvas, select the “Custom Event” trigger type
Step 4: Complete the trigger template as shown below
- Note: It is very important to pay attention to the value that you enter into the “Event Name” field. This is case sensitive. Additionally, if you created a different prefix when configuring the GA4 connection within Terminus Web Experiences, you will need to use that prefix here in place of “webex_”
Step 5: Save the trigger
Repeat Steps 1-5 for the Web Experiences Impression and Web Experiences Click triggers.
Once complete you should have 3 new triggers that appear in your triggers list as in the image below:
Create the Terminus Web Experiences Tags
Once you have created your Web Experiences variables and triggers, you will need to create two Web Experiences tags. The tags are what actually send the data.
To begin, select “Tags” from the menu on the left
The first tag will be the Web Experiences Click tag.
Step 1: In the top right corner, select the "New" button to begin your tag configuration
Step 2: Name your tag “Web Experiences Click”
Step 3: In the tag configuration canvas, select the “Google Analytics: GA4 Event” as the tag type. (Note: make sure you select GA4 Event and not GA4 Configuration)
Step 4: From the Configuration Tag dropdown, select “GA4 Configuration
Step 5: In the Event Name field, click on the lego icon and select “Event” (Note: this is a standard variable that should exist in your variables list)
Step 6: Click on “Event Parameters” to expand those fields. Then add 4 Event Parameter rows.
Step 7: In the first row, type “webex_campaign” in the Parameter Name field. Then, in the Value field, click on the lego icon and select the “Web Experiences Campaign” variable
Repeat Step 7 for webex_rule, webex_segment, and webex_content
- Note: It is very important to pay attention to the value that you enter into the “Parameter Name” field. This is case sensitive. Additionally, if you created a different prefix when configuring the GA4 connection within Terminus Web Experiences, you will need to use that prefix here in place of “webex_”
When you have created all four Event Parameter rows, your tag configuration should look like this
Step 8: Next you need to select a trigger. In the Triggering canvas, select the “Web Experiences Event - Click” trigger
Step 9: Save your Web Experiences Click tag
Now you will create your second tag - the Web Experiences Impression tag
Step 1: In the top right corner, select the "New" button to begin your tag configuration
Step 2: Name your tag “Web Experiences Impression”
Step 3: In the tag configuration canvas, select the “Google Analytics: GA4 Event” as the tag type. (Note: make sure you select GA4 Event and not GA4 Configuration)
Step 4: From the Configuration Tag dropdown, select “GA4 Configuration
Step 5: In the Event Name field, click on the lego icon and select “Event” (Note: this is a standard variable that should exist in your variables list)
Step 6: Click on “Event Parameters” to expand those fields. Then add 4 Event Parameter rows.
Step 7: In the first row, type “webex_campaign” in the Parameter Name field. Then, in the Value field, click on the lego icon and select the “Web Experiences Campaign” variable
Repeat Step 7 for webex_rule, webex_segment, and webex_content
- Note: It is very important to pay attention to the value that you enter into the “Parameter Name” field. This is case sensitive. Additionally, if you created a different prefix when configuring the GA4 connection within Terminus Web Experiences, you will need to use that prefix here in place of “webex_”
When you have created all four Event Parameter rows, your tag configuration should look like this
Step 8: Next you need to select a trigger. In the Triggering canvas, select the “Web Experiences Event - Impression” trigger
Step 9: Save your Web Experiences Impression tag
Publish your updates.
Once the Tags have been saved, the Google Tag Manager configuration is complete. At this point, you will need to go ahead and publish your updates so that the changes go into effect.
Part 3. Configure GA4
Once your updates have been published in GTM, you’re almost ready to start seeing your data in GA4. The last thing you will need to do is create some GA4 custom dimensions to display all of your performance data for your impression and click events. Each custom dimension will align to one of the event parameters that you assigned to your Bound Impression/Click tags in the GTM configuration above.
Begin, by navigating to the Admin section of the GA4 dashboard and selecting Custom Definitions
Once in the Custom Definitions screen, select the blue “Create Custom Dimensions” button. You will need to create one custom dimension for each of the four event parameters that were created in GTM.
You can create the custom dimensions as outlined below:
- Dimension Name: This is the name that will appear in the GA4 interface. The 4 dimension names are “Web Experience Campaign” “Web Experience Rule” “Web Experience Segment” and “Web Experience Content”
- Scope: Each of these dimensions will be tied to the event parameters that were created in GTM so you will select “Event” as the scope
- Description: You can give your dimensions any quick description to remind you what the data is showing
- Event Parameter: Here you will need to enter (or select from the dropdown) the Event Parameter name that was entered in GTM. This needs to exactly match the value from GTM. Normally, these values will auto populate in the dropdown; however, it can take up to 24 hours before they become available so if you just created the values in GTM, you can go ahead and manually enter them here.
Once all of your event parameters have been added as custom dimensions, your custom dimension list should look similar to this:
At this point, your configuration is complete. Your event details will begin feeding into GA4 and you should see the data populate with all associated parameters.
Comments
0 comments
Article is closed for comments.