Connecting BlueConic to Google Analytics through Google Tag Manager

When you use Google Analytics (GA) along with Google Tag Manager (GTM), you should communicate events through GTM. To do this, you need to setup a BlueConic Google Tag Manager connection. You will also need to setup GTM and GA accordingly. We will walk you through the steps of getting user BlueConic segments into GA.


In this tutorial, we will be setting up BlueConic so BlueConic can communicate the segments a profile is part of, through GTM to GA. You require a BlueConic account, which is authorised to set up a connection, a GTM account and a GA account.

For each page view, BlueConic will send a BlueConic specific event using the GTM data layer. You can send any BlueConic profile data along with this event, but should refrain from sending personally identifiable information(PII).

When GTM receives the BlueConic event, this will trigger a tag. We will show you how to setup the trigger and tag. The tag and trigger require a number of variables that we also help you to setup in GTM.

The tag will then pass on the data to GA automatically. Once you complete this tutorial and test the connection, you will have a feel for how the data flows. This setup can be adjusted as required.

To recap BlueConic will trigger a GTM tag that sends data to GA. This setup is glued together by a number of variables.

BlueConic Settings

  1. Go to the "Connections" tab and add a Google Tag Manager (GTM) connection.
  2. Select the goal: "Send BlueConic customer data to Google Tag Manager data layer variables", this should look something like:
  3. Press "Add a Variable" to map a BlueConic value to a GTM Variable
  4. Choose "Associated Segment(s)" as value type and optionally click "All associated segments" to use the segment selection popup to narrow down which segments you want to send. You can also map segment name to code.
  5. Choose a corresponding Tag Manager Variable, e.g. BcSegments. This step will add all or some segments that the visitor is part of to the specified tag manager variable. We will use that Tag Manager variable to send the data to a Google Analytics dimension later.
  6. Open the "Advanced Settings" and enter the value dataLayer in the field "Object Name". Enter BlueConic as "Event Name" and set "Push Frequency" to "Each Page View". You should end up with the following:
  7. Enable the connection and save

Google Analytics Settings

  1. Open your Google Analytics account and the relevant account, and go to the Admin" tab. Select "Custom Definitions"GA1.pngAdd a new "Custom Dimension" called "BcSegments". Set "Scope" to "User" and check 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


Google Tag Manager Settings

  1. Open your GTM account and the relevant container. Within the workspace, go to "Variables"
  2. Add a new "Variable". Fill it with:
    • Title: BcSegments
    • Variable type: Data Layer Variable
    • Data Layer Variable Name: BcSegments
    • Data Layer Version: Version 2GTMVariable.png
  3. Also add the following 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 id you noted earlier (Google Analytics setting step 4).

  1. Go to "Tags" and add a new 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}}
    • 'Check' Overwrite settings of this tag
    • Tracking ID: {{Google Analytics ID}}
    • More Settings -> Custom Dimensions:
      • Index: Put the dimension index from Google Analytics here
      • Dimension Value: {{BcSegments}}


  1. The above tag is then linked to the different variables you entered on steps 2 and 3. Go ahead and check if each variable name (between {{ }}) coincides with a variable.
  2. Go to "Triggers" and create a new trigger called "Datalayer".
    • Triggertype: "Custom Event".
    • Event Name: "BlueConic"
    • Event: "BlueConic", this should be the same as what you entered in the blueconic connection settings.


  1. Link the tag to the trigger, save.

Testing Tag Manager

  1. Select "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 and then "Data Layer in the top menu.
  4. You should be able to trace what is being written to "GTM 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"
    • Statistics group: "Users"
    • Dimension details: "BcSegments"
  4. Open the report. You will see the segment value ("All Visitors") appear.