Google Optimize Integration Installation Guide

  • Updated

Overview

Google Optimize lets you test and build analysis around unique user experiences on your company’s website. Integrating Demandbase with Google Optimize allows you to build user experiences with Demandbase firmographic data and then test those experiences to ensure optimal user interaction on your web pages.

Step-by-Step Guide

Integrating Demandbase with Google Optimize takes just a few minutes using these steps:

Step 1: Link your Google Analytics account with Google Optimize

1.1 In the right Container Information sidebar of your Google Optimize container, link your Google Analytics account with Google Optimize by clicking the Link property button.

go1.png

1.2 Select a GA property and any associated views.

go2.png

Step 2: Create a New Demandbase Experience

2.1 Create a new experience type using either A/B Test, Multivariate Test, or Personalization.

go3.png

2.2 Update Variants (A/B & Multivariate Tests) or Site Changes (Personalization test) and the page targeting URL to desired changes and URL.

go4.png

2.3 Within the Audience Targeting section, create a new custom rule type using Custom JavaScript.

go5.png

2.4 In the Custom JavaScript window, insert the following code into the code editor to utilize a Demandbase attribute like Industry:


function () {

if (window.Demandbase.IP.CompanyProfile && window.Demandbase.IP.CompanyProfile.industry) {

return window.Demandbase.IP.CompanyProfile.industry

}

return 0;

}

 

go7.png

NOTE: To use other Demandbase data attributes, you may need to replace the underlined industry in the code above with the API variable name of any Demandbase firmographic attributes listed in this article.

2.5 When you are finished creating the custom variable, you can then create a rule utilizing that variable.

go8.png

Step 3: Create a New Activation Event

3.1 At the bottom of the experience details page, you will need to update the Activation Event.

go9.png

3.2 Within the activation event, update the settings as they are shown in the following image:

go10.png

NOTE:  The Demandbase team must update your Demandbase tag to officially enable the activation event referenced above before you can begin testing.

Step 4: Customize Your Data with Demandbase Data

NOTE:  For this step, it is strongly recommended to have a technical resource available with expertise in JavaScript and HTML.

4.1 In the content editor, select the element that you want to customize and then select a Javascript change. You may do this with the selector in the top navbar or the blue Edit Element button in the bottom right editing box.
go11.png go12.png

4.2 Insert your custom code into the JavaScript editor to trigger those changes. If you want to use Demandbase data (for example, Marketing Alias or Company Name) in your customized content, you need to access it from the data layer. You can use the following code to grab the index of the Demandbase data within the data layer:

var idx;

dataLayer.forEach(function(el, i) {

  if (el.registry_company_name) {

idx = i;

  }

});

In the example below, we've used the index ('idx') to access the 'marketing_alias' data from the data layer. You can change the 'marketing_alias' data attribute to any other Demandbase data attribute for use in your customized content. For instance, if you wanted to use 'company_name', just replace 'window.dataLayer[idx].marketing_alias' with 'window.dataLayer[idx].company_name'. The full list of Demandbase firmographic attributes can be found here. You may reach out to support@demandbase.com or your designated Implementation Engineer for further assistance if needed.

go13.png

Was this article helpful?

0 out of 0 found this helpful