This is the installation manual for Digiseg Google Analytics integration. Please beware that you need a token connected to your domain before you can use our Google Analytics integration. If you don’t have a Digiseg Google Analytics token yet, you can get one for free, by signing up here.

Integrating Digiseg Audience data into Google Analytics as Custom Dimensions

The purpose of the Digiseg audience data integration is to enrich reporting on visitor acquisition & behavior with socio-demographic data allowing analysts and marketers to gain deeper insights and drive smarter marketing-efforts. The data is integrated as custom dimensions within Google Analytics, and as a result, is available in the majority of views within Analytics (either as breakdown categories or as a part of the segmenting functionality).

Currently, the following variables are available (the names used in the script is identical to below):

  • Household Income
  • Cars in the Household
  • Home Ownership
  • Tech-level in Household
  • Children in the Household
  • Accommodation Type
  • Savings
  • Lifecycle
  • Education
  • Neighborhood Type
  • Livingspace M2
  • Building Year
  • Business

For a full list of all Digiseg Core Audience Data.

Technical Integration

The integration of data into Google Analytics depends on an existing, functional Google Analytics setup either using Universal Analytics (ga.js) or using Google Tag Manager with Data Layer. No matter which of the two setups are available, the following steps are identical.

1. Setting up custom dimensions in Google Analytics

To begin with, set up a custom dimension for each of the variables you want to be made available within Google Analytics, following the official instructions here: https://support.google.com/analytics/answer/2709829. As a scope, define each as a user-level variable and set the name to your liking. Take note of the custom dimension ID number as we’ll need those later.

2. Add analytics-script to the website

The script required to integrate the Digiseg Core Audience Data can now be added to the site (preferably the head-section of the site). This is done, by the following line:

<script type="text/javascript" src="https://ga.digiseg-collect.net/client.min.js"></script>

Note: The script is listening for the Google Analytics tracking script to load and is therefore not depending on being loaded after the Google Analytics script(s).

3. Configure the analytics-script

After the script has been added, it needs to be configured and called. This is done by the following snippet, where the key should be replaced with the variable you want (see list in introduction), “dimensionXX” should be replaced with the ID for your particular installation (the ones from step 1) and the API-key (provided by Digiseg) should be replaced with your unique one.

<script>
   var APItoken = "Insert token here";
   var CoreVars = {
      'accommodationtype'            : 'dimension1',
      'savings'                                   : 'dimension2',
      'lifecycle'                                  : 'dimension3',
      'cars in the household'          : 'dimension4',
      'children in the household'.  : 'dimension5',
      'education'                              : 'dimension6',
      'neighborhood type'              : 'dimension7',
      'household income'               : 'dimension8',
      'home ownership'                  : 'dimension9',
      'building year'                        : 'dimension10',
      'livingspace m2'                     : 'dimension11',
      'tech-level in household'      : 'dimension12',
      'business'                               : 'dimension13'
   };
   window.runDigiseg(APItoken, CoreVars);
</script>

The above lines make sure the correct configuration is passed to the script, ensuring the variables appear correct in Google Analytics. Please be aware though, that in case you are using Google Tag Manager Data Layer, you might have to map the variables to the custom dimension within Google Tag Manager and define an event.

The script automatically chooses between the Universal Analytics or Google Tag Manager API to send data to Google Analytics. It is possible to enforce one or the other by setting the variable GAAPI to UA or GTM. Like this:

var GAAPI = “GTM”;

Insert this before the window.runDigiseg call.
Note: If there are one (or more) of the variables that you don’t want to be integrated, leave it out of the CoreVars-object passed to runDigiseg.

4. Events

The data is sent to Google Analytics via Universal Analytics or to dataLayer as an event named “Digiseg”. You can use this event as a trigger in Google Tag Manager, to map the dataLayer values with the corresponding Custom Dimensions in Google Analytics.

Tags:

AFRVars are not mapped the same way as in our setup guide. Makes sure mapping corresponds to your implementation.

Variables:

All setup similar to this, with name copied from the script:

Trigger:

Setting up reports in Google Analytics

This is an example of how you can set up reports in Google Analytics and view Digiseg Data.

Make a Custom Dashboard and analyze the visitors using Digiseg’s Household Characteristics

Google Analytics Custom Dashboard Google Analytics Custom Dashboard

Setup Custom Reports and dive into each of Digiseg’s households characteristics

Go to: Customization > Custom Reports > + New Custom Report