Our Google Analytics 4 Connector routes data to your GA4 property. Player events and custom events are received under the Event name
dimension in GA4. Fluxdata, metadata, and custom metadata are attached to each Event name
as custom dimensions based on the mapping setup during the configuration process described below.
To get started you will need your property’s Measurement ID
along with an API Secret
. You can generate an API Secret
by going to the Admin gear icon in the lower left of the Google Analytics Property page then click on Data Streams, then click on the stream you will be using. Scroll down to Measurement Protocol API secrets and click the “Create” button. Give the API a name then click “Create”.
Configuring the GA4 Connector
Follow the directions on “How to add a Connector” and select the Google Analytics 4 Connector from the list of items presented. You will be presented with the following screen:
Paste the API Secret and Measurement ID from the previous step. Go to the Google Analytics 4 mapping doc, copy the json presented, then paste that into the Custom Dimension-Metric Index Mapping field. Click “Save Changes” button. If all goes well you will see a message “Testing Google Analytics 4: Success” in the Connector window.
Configuring Custom Definitions in GA4
The next part of the configuration assumes that you have access to add custom dimensions to your property. Click on Custom definitions then click the “Create custom dimensions” button. Add as many custom dimensions as needed to build the metrics you wish to create. Our Metrics Encyclopedia lists a number of common metrics with the data points needed to calculate them.
Enter the “Dimension name” exactly as is from the dimension mapping document you accessed above. Enter that same name in the “Event parameter” field then click save. Repeat this step for each dimension you wish to have available in GA4.
Including a Reporting Identity as Custom Metadata for your Collector
An example of a Reporting Identity is the client_id
(Also referred to as the device_id
in GA4). Datazoom uses the reserved key name googleAnalyticsClientId
to map the key value collected to the appropriate location in Google Analytics 4.
Example:
//set Datazoom custom metadata with gtag client_id const client_idPromise = new Promise(resolve => { gtag('get', 'G-XXXXXXXXX', 'client_id', resolve) }); client_idPromise.then((client_id) => { datazoom.setMetadata( { "googleAnalyticsClientId":client_id }); })
Read more about Reporting Identity in the official Google Analytics 4 documentation here:
https://support.google.com/analytics/answer/10976610?hl=en
Comments
0 comments
Article is closed for comments.