Note that this Demandbase Integration is deprecated. Use the newer Demandbase Integration instead. For details, see:

Developer Help Centre > Demandbase Integration

Integrating Maxymiser with Demandbase

Integrating with Demandbase allows you to use Demandbase's profile to enrich Maxymiser testing logic.

This article explains how to:

  • Integrate a Maxymiser campaign with Demandbase to access its profile

How we access the data?

This integration uses Demandbase public data on a page to retrieve attributes stored in its profile.

Integration Implementation

The Maxymiser integration with Demandbase is based on 3 separate scripts. Follow the steps described under "Configure sample integration for a campaign" heading in the Integrations Overview article to set up the integration.

  1. Integration Module (Site Script, take from Step 1);

  2. Demandbase register (Site Script, use for Step 2);
    // Demandbase integration v1.1.0 (function() { var Demandbase = { version: '1.1.0', tag: true, timeout: 3000, validate: function(integration) { if (!helpers.isValidArray(integration.attributes)) { return 'Invalid `attributes` array'; } if (!integration.tag) { return true; } if (!integration.tag || !/^\w+$/.test(integration.tag)) { return 'Invalid `tag` property'; } helpers.tag(integration.tag); return true; }, check: function(integration) { return !!(window.Demandbase && window.Demandbase.IP && window.Demandbase.IP.CompanyProfile); }, exec: function(integration) { var attributes = {}; for (var i = integration.attributes.length; i--;) { var key = integration.attributes[i]; attributes[key] = window.Demandbase.IP.CompanyProfile[key] || 'unknown'; } integration.result = attributes; return true; } }; var helpers = { isValidArray: function(object) { return object && typeof object === 'object' && typeof object.push === 'function'; }, tag: function(tagId) { when(function() { return !!document.body; }).done(function() { var script = document.createElement('script'); script.src = '//scripts.demandbase.com/' + tagId + '.min.js'; script.type = 'text/javascript'; document.getElementsByTagName('head')[0].appendChild(script); }); return true; } }; // Register and export if (typeof modules === 'object' && typeof modules.define === 'function') { modules.require('Integrations').register('Demandbase', Demandbase); } })();

  3. Demandbase initialize (Campaign Script, use for Step 3)
    Integrations.run("Demandbase", { timeout: 4000, attributes: ['industry', 'sub_industry'], tag: false // change to true if the tag is not present on the page });