ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Google Analytics Destination

Steps to implement Google Analytics destination

  1. 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.

  2. 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.
  3. The workspace consists of a CDP Destination connector, a processor, and a Google Analytics Audience loader.
  4. In Business Explorer, select the workspace that you have created for the Google Analytics Audience.
  5. Set up an attribute for GA IDs for the last 90 days in CDP, as well as the attribute definition in CDM.

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 /data/out/files/export.csv after processing.

Processor

  • 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: mv/data/in/tables/export.csv/data/out/files/export.csv

Google Analytics Audience loader

  • The loader expects the exported audience segment to be in the path:  /data/in/files/export.csv 
  • The export.csv file will have a column header for the google analytics id, this would be the attribute id for the 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 export.csv 

FAQ

Why do the GA IDs need to be in a JSON array format? eg. ["1234567890.1234567890"]

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?

Point 4 in https://docs.meiro.io/books/meiro-business-explorer/page/export-your-segment-how-to-export-my-audience-to-google-analytics-and-google-ads