Knowledge Base

Connecting BlueConic to Google Analytics through Google Tag Manager

What: When using Google Analytics (GA) in tandem with Google Tag Manager (GTM), events have to be communicated through Tag Manager. To do this, you will first need to set up a BlueConic Google Tag Manager connection. Next, you will also need to configure Tag Manager and Google Analytics. This article walks you through the steps of getting user BlueConic segments into Google Analytics.

Why: You want to send BlueConic profile properties or segments to Google Analytics, and the Google Analytics tags on your website are served by Google Tag Manager. As a result of this combination of platforms, BlueConic cannot communicate directly with GA the way it normally would. Instead, communication with Google Analytics has to go through Google Tag Manager.

Note: You can use the Google Tag Manager connection with both Google Analytics 3 and Google Analytics 4 (GA4). Note that there are differences on the Google Analytics side for how GA4 tags are set up in Google Tag Manager and in how you set up GA4 to receive the data from Google Tag Manager. To learn more about how to set up tags in Google Tag Manager for GA4, visit the Google Tag Manager documentation

This document only covers the combination of Google Tag Manager and Google Analytics. If you are not using Tag Manager to serve the Google Analytics tag, this document is not for you. Set up a Universal Analytics connection instead.


In this document, we be will setting up BlueConic to send information about the segments a profile is part of through Tag Manager to Google Analytics. You will need a BlueConic account authorized to set up a connection, a Tag Manager account, and a Google Analytics account.

For each page view, BlueConic will send a BlueConic specific event using the Google Tag Manager data layer.

When Tag Manager receives the BlueConic event, this will trigger a tag. We will show you how to set up the trigger and tag. The tag and trigger require a number of variables that we will also help you to set up in Tag Manager. Once these things have been configured, the tag will then pass on the data to GA automatically.

After completing this walkthrough and testing the connection, you will have a feel for how data flows from BlueConic via Tag Manager to Google Analytics. You can then tune the setup to match your own requirements.

To recap: BlueConic will trigger a Tag Manager tag that sends data to Google Analytics. This setup is glued together by a number of variables.

BlueConic Settings

  1. If you don't already have a Google Tag Manager connection in BlueConic, go to the "Connections" tab, click "Add connection" and add a Google Tag Manager connection.
  2. On the "Setup" tab, verify the name of the data layer. This should be dataLayer (case sensitive), unless you use a custom data layer name on your website:
    What is the difference between marketing customer metrics in a CDP like BlueConic and Google Analytics? 
  3. Activate and select the export goal: "Export data into Google Tag Manager".
  4. Map BlueConic data to Google Tag Manager variables, for example:
    How are BlueConic profile properties exported to Google Tag Manager and Google Analytics?
  5. Choose "Associated Segment(s)" as value type and optionally click "All associated segments" to use the segment selection pop-up to narrow down which segments you want to send. You can also have the BlueConic segment name replaced by a value used in Google Tag Manager and Google Analytics.How are customer segments different between BlueConic and Google Tag Manager and Google Analytics?
  6. Enter the corresponding Tag Manager variable, for example, BcSegments. This tells BlueConic to add segments that the visitor is part of to the specified variable. We will use this Tag Manager variable to send the data to a Google Analytics dimension later.

You can send any BlueConic profile data along with this event, but refrain from sending personally identifiable information (PII), as this is not allowed per Google's terms of service.

  1. Under "When to push data to Google Tag Manager," set "Push Frequency" to "Each Page View":
    How to export marketing customer analytics from BlueConic to Google Analytics via Google Tag Manager
  2. For "Event name", enter "BlueConic".
  3. Enable the connection and save

Google Analytics Settings

  1. Open your Google Analytics account with the relevant account, and go to the Admin" tab. Select "Custom Definitions"How do I export customer marketing metrics from BlueConic to Google Analtyics custom definitions and segments?Add a new "Custom Dimension" called "BcSegments". Set "Scope" to "User" and select the "Active" checkbox.
  2. Save the dimension and note the "Index" of your dimension
  3. Also note your Google Analytics or Universal Analytics 'Tracking Id'. How to find it

How do I export marketing metrics for views clicks and conversions to Google Analytics from BlueConic?

Google Tag Manager Settings

  1. Open your Tag Manager account and the relevant container. Within the workspace, go to "Variables"
  2. Create a new "User-Defined Variable". Fill it with:
    • Title: BcSegments
    • Variable type: Data Layer Variable
    • Data Layer Variable Name: BcSegments
    • Data Layer Version: Version 2How to match Google Tag Manager variable and segments to BlueConic
  3. Also add the following six variables:
Title Variable type Data Layer Variable Data Layer Version Value Tracking Id Cookie Domain
eventCategory Data Layer Variable eventCategory Version 2      
eventAction Data Layer Variable eventAction Version 2      
eventLabel Data Layer Variable eventLabel Version 2      
eventValue Data Layer Variable eventValue Version 2      
Google Analytics ID Constant     <Tracking Id>    
Google Analytics Settings Google Analytics Settings Google Analytics Settings     <Tracking ID> auto

Substitute <Tracking ID> with the analytics tracking id you noted earlier (Google Analytics setting step 4), this should look like UA-12345-6.

The variables "eventCategory", "eventAction", "eventLabel" and "eventValue" add meta information about the event that can be used for reporting. Adding these variables is recommended, but optional.

When you are done, it should look like this: How do I set up a connection between BlueConic and Google Analytics to synchronize customer marketing metrics?

  1. Go to "Tags" and click "New" to add a tag with following configuration:
    • Title: BlueConic Connection
    • Type: Universal Analytics
    • Tracking Type: Event
    • Category: {{eventCategory}}
    • Action: {{eventAction}}
    • Label: {{eventLabel}}
    • Value: {{eventValue}}
    • Non-Interaction Hit: true
    • Google Analytics Settings: {{Google Analytics Settings}}
    • Activate "Enable overriding settings in this tag"
    • Tracking ID: {{Google Analytics ID}}
  2. Open "More Settings" and navigate to "Custom Dimensions". Configure this as follows:
    • Index: Put the dimension index from the Google Analytics settings here
    • Dimension Value: {{BcSegments}}

How do CDPs like BlueConic manage customer metrics with Google Analytics?

  1. The above tag is then linked to the different variables you entered in steps 2 and 3.
  2. Click the "Triggering" block and click "+" in the top right to create a new trigger called "Datalayer".
    • Triggertype: "Custom Event"
    • Event Name: BlueConic

How do I map BlueConic customer profile metrics to Google Analytics triggers?

  1. Click "Save" to link the tag to the trigger and click "Save" to save everything.

Testing Tag Manager

  1. Click "Preview"
  2. In a new window, open the domain on which you wish to test. In the Google Tag Manager panel you should see a BlueConic Connection tag being fired.
  3. Select "BlueConic" in the left panel in the console and then select "Data Layer from the top menu.
  4. You should be able to trace what is being written to "Google Tag Manager Data Layer". This should at the very least be "BcSegments: All Visitors"

Analytics Review

  1. Return to Google Analytics
  2. Select "Customization - Custom Reports"
  3. Create a new modified report: "BC Segments"
    • Select a relevant statistics group, for example, "Users"
    • Dimension details: "BcSegments"
  4. Open the report. You will see the segment values appear, for example, "All Visitors". Be sure to select the right time frame in Google Analytics

Learn about synchronizing BlueConic data with Google Analytics

See our blog post about important things to consider when synchronizing your BlueConic profile data with Google Tag Manager and Google Analytics: Enrich Google Analytics Data with a Customer Data Platform like BlueConic.