Advanced Google Analytics integration with Salesforce Marketing Cloud (SFMC)

Digioh Advanced GA integration 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 SFMC. 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 GA and Salesforce Marketing Cloud (SFMC)

At a high level, the steps are:

A) Create a Data Extension in SFMC to receive GA 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 SFMC to receive GA 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 or is not 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 the fact 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.

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:

https://SFMC_API_SUBDOMAIN.rest.marketingcloudapis.com/hub/v1/dataevents/key:DATA_EXT_NAME/rows/PRIMARY_KEY_NAME:

Replace the values in the reference URL:

  • SFMC_API_SUBDOMAIN: your endpoint URL looks something like https://mcbpbp7cxkn1yj0c0c3w3qpxw4w7.rest.marketingcloudapis.com/hub/v1/. 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:

https://mcbpbp7cxkn1yj0c0c3w3qpxw4w7.rest.marketingcloudapis.com/hub/v1/dataevents/key:digioh_ga_segments/rows/SubscriberId:

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

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 that if you are already adding 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.

Complete! 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 analytics@digioh.com.

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