Advanced Google Analytics integration with Salesforce Marketing Cloud (SFMC)

Digioh’s Advanced Google Analytics integration with SFMC allows you to target (or anti-target) Digioh boxes to GA segments on your website using box conditions, in the same way you would target page URLs or cookie values. We also support synchronization of GA segments to a range of Email Platforms (ESPs), including Salesforce Marketing Cloud. This document assumes you have already completed initial setup on the Digioh Google Analytics Settings page (User menu -> GA Segment) by configuring Account Type, Embed Type, Dimension for DIUID, and picked some segments to sync to Digioh.

Instructions for Syncing Google Analytics and Salesforce Marketing Cloud (SFMC)

At a high level, the steps are:

A) Create a Data Extension in Marketing Cloud to receive Google Analytics segment data
B) Configure the mapping of GA segments to specific attributes within the Data Extension
C) Create an SFMC integration in Digioh for the Data Extension
D) Configure ESP in Digioh Google Analytics Settings
E) Configure SFMC to append SubscriberId to all email URLs

A) Create a Data Extension in Marketing Cloud to receive Google Analytics segment data

Because SFMC instances are so varied, we can’t provide specific step by step instructions here, but here are some pointers:

1) Generally in SFMC, Data Extensions live under Audience Builder > Contact Builder.
2) The Data Extension “external key” is what we use with the SFMC API, it should be human and machine readable, so for example: digioh_ga_segments.
3) SubscriberId is a special attribute in SFMC, and you must add this to the Data Extension and make it the primary key so that it links to other subscriber data.
4) Create boolean attributes for each of the GA segments you plan to sync to SFMC, defaulting to false. See next step B.

The data extension attributes must be boolean (true/false) because we are setting true or false based on whether a subscriber is in the GA segment.

B) Configure the mapping of GA segments

1) From Digioh Google Analytics Settings, click Google Analytics Segments to see the list of available segments.
2) For each segment you want to pass to SFMC:
2.1) Check the box to enable sync, if not already checked
2.2) Enter the name of the corresponding boolean attribute in the Data Extension.

Note that segment names are typically plural, e.g. “Landing Page Visitors”, whereas Data Extension attribute names should be singular, e.g. “landing_page_visitor”, reflecting that segments are sets of users whereas attributes are for specific users. Digioh will retrieve the set of users from GA and update the attribute in SFMC for each user in the set.

mapping google analytics segments

C) Create an SFMC integration in Digioh for the Data Extension

You may already have a configured integration to pass form data from Digioh to SFMC data extensions integration.

We can use the same integration configuration info to set up an additional Digioh integration to SFMC for segment synchronization into a Data Extension. Specifically we’ll use the endpoint, subdomain, account, client id, and secret. The only thing that differs from a regular SFMC integration is the API Endpoint. Here’s a reference URL:

Replace the values in the reference URL:

  • SFMC_API_SUBDOMAIN: your endpoint URL looks something like Use the same subdomain as already configured for leads.
  • DATA_EXT_NAME: We recommend digioh_ga_segments, but this should be the external ID for your new Data Extension
  • PRIMARY_KEY_NAME: We recommend SubscriberId for consistency in SFMC, but this is the name of the primary key attribute

So your final endpoint URL might look like this:

Note that the colons (:) in the URL path are important, don’t remove them.

D) Configure ESP in Digioh Google Analytics Settings

  • ESP Name: enter SFMC
  • ESP Integration ID: this is the ID of the integration you set up in step C. To find your ID In Digioh, go to Integrations and the IDs are listed on the left.
  • ESP ID URL Param: this is for the unique SFMC subscriber id appended to all URLs in step E. We recommend “SubscriberId” for consistency with the data extension, but it can be any valid URL query string parameter name as long as it is consistent with step E.

configure google analytics and sfmc integration in digioh

E) Configure SFMC to append SubscriberId to all email URLs

This is how we link SFMC records with GA records: by appending the SubscriberId as a parameter to all URLs in emails sent from SFMC. SubscriberId is SFMCs specific ID for what we’d generally call “ESPID” in email platforms.

Do this using in SFMC using Parameter Manager, documentation here.

Configure SubscriberId=[SubscriberId] on all URLs.

Note: If you already add a unique ID parameter to your URLs, contact us and we will configure an ESP ID Custom JS Function to use the existing parameter rather than add a new one.

Once set up, we’ll help you test data flows. If you haven’t already, please share read-only access to your GA instance with

Remember: the turnaround on segment synchronization is 12-24 hours. GA segments synchronized to SFMC are great for marketing, but unsuitable for real-time triggers.