Google Analytics Destination
1. Steps to implement Google Analytics destination
- Create a task in #help_product to create the destination in Business Explorer (CDP).
For on-premise implementation, instructions may be given by product team for clients to execute.
- Create a workspace in Meiro Integrations (MI) for the Google Ads destination. This is the workspace that will run when the user clicks on "Export" in the segment builder.
- The workspace consists of a CDP Destination connector, a processor, and a Google Analytics Audience loader.
- In Business Explorer, select the MI workspace under Meiro Integrations that you have created for the Google Analytics Audience.
- Set up an attribute for "All GA IDs in the last X days" where X is somewhere between 30 and 90 days, as well as the attribute definition in Customer Data Model (CDM).
- Go to Administration > Entities > Destinations > (pencil icon) Edit
- Add the created attribute under exported attributes and mandatory attribute.
- Add under Parameters:
ga_audience_name. This parameter will show up in the segment builder when user chooses GA destination as an export destination. It will be populated into the MI workspace variable of the same name:
ga_audience_namewith the value that the user fills in.
If you defined parameters, you must make sure the Meiro Integrations Key matches the Workspace variable name in the chosen MI workspace.
When you are done, you should see the destination under Administration > Entities > Destinations (Example below)
Note down the ID of the destination, you will need it for the CDP Destination connector configuration
2. Configurations for Workspace in Meiro Integrations
CDP Destination connector
- You will need to setup the MI API credentials and on the CDP
- You will require the CDP API credentials for this connector.
- The "Export Destination ID" is the ID of the CDP Destination for Google Analytics that is setup in Business Explorer.
- You will require the credentials for the CDP database as well.
- The output of this configuration is
/data/out/tables/export.csv. Your processor will need to move it into
- There should be no need to further enrich the data as it is already in the format that can be used for the loader. Therefore, you can simply use a Command Line Interface Code processor to run a bash shell command to move the file to the location needed for the loader:
Google Analytics Audience loader
- The loader expects the exported audience segment to be in the path:
export.csvfile will have a column header for the google analytics id, this would be the attribute id for the exported google analytics id attribute as defined in Business Explorer when setting up destination.
- The setting: "Google Client ID Column Name" in the loader setting corresponds to the column/header name for the google analytics id from the input csv file
- Set the GA property and Audience Name to the workspace variables
ga_audience_namerespectively. You will have to obtain the values for them from the client.
Why do the GA IDs need to be in a JSON array format? eg.
The format for GA ID is JSON array as 1 customer (1 line in export from CDP) can have multiple values for an attribute. If attributes
is_unique = 0, then it will have the array containing all values for this attribute. Also, the loader expects the google analytics id to be in a JSON array. It iterates through the ids contained in the array when loading them into Google Analytics.
Why is there no authentication required for this loader?
We are using Measurement Protocol to send events with specific name and value and segment in GA based on this. Read https://docs.meiro.io/books/meiro-business-explorer/page/set-export-destination-to-google-analytics-google-ads-work and https://developers.google.com/analytics/devguides/collection/protocol/v1
How do I test out the loader after I am done setting up the workspace to confirm that it works before going to the client?