This new setup requires some orchestration between the new-ish Google Tag Manager console and the familiar Google Analytics console. It took more time than expected to figure it out, but I understand it now (somewhat). GTM provides non-technical users a way to setup Google Analytics event tracking within the GTM admin console, without making any code changes.
In the Google Tag Management console, I created two triggers:
Download Source Data Event
Download Standardized Data Event
Both of these triggers are attached to the same Download Data Event Tag.
Google Analytics console
When a user clicks on either of the links for the triggers, it will log in Google Analytics with the download_data_event.
BGA users will be able to distinguish between the download triggers (standardized data vs source data) with the help of values in download_data_text and download_data_url. We can separate these two triggers to have their own tags if we want, but for this iteration all download events are tagged as a download_data_event.
Note that the Google Tag Manager in GA4 tracks file downloads by default. I turned this off since I thought it would be confusing to have two different file download event types, and decided to consolidate under this one custom download_data_event. Also, the source file was the only download tracked by this, since the new data download requests the server and doesn't have a filename (which is used by GA4 to determine if it's a file_download event)
Testing
Use this branch locally: git pull origin google-tag-manager.
Download source data and the new standardized data.
Go to the Salary property in Google Analytics
In the Realtime Overview, make sure you see the different events in the download_data_event type. Apparently it takes some time for the events to show up in the Engagement section.
Overview
For issues:
556
551
Notes
This new setup requires some orchestration between the new-ish Google Tag Manager console and the familiar Google Analytics console. It took more time than expected to figure it out, but I understand it now (somewhat). GTM provides non-technical users a way to setup Google Analytics event tracking within the GTM admin console, without making any code changes.
Google Tag Manager console
I followed this guide to implement the click tracking.
In the Google Tag Management console, I created two triggers:
Download Source Data Event
Download Standardized Data Event
Both of these triggers are attached to the same
Download Data Event Tag
.Google Analytics console
When a user clicks on either of the links for the triggers, it will log in Google Analytics with the
download_data_event
.BGA users will be able to distinguish between the download triggers (standardized data vs source data) with the help of values in
download_data_text
anddownload_data_url
. We can separate these two triggers to have their own tags if we want, but for this iteration all download events are tagged as adownload_data_event
.Note that the Google Tag Manager in GA4 tracks file downloads by default. I turned this off since I thought it would be confusing to have two different file download event types, and decided to consolidate under this one custom
download_data_event
. Also, the source file was the only download tracked by this, since the new data download requests the server and doesn't have a filename (which is used by GA4 to determine if it's a file_download event)Testing
git pull origin google-tag-manager
.Salary
property in Google Analyticsdownload_data_event
type. Apparently it takes some time for the events to show up in the Engagement section.