Demandbase Partner Tag

The Demandbase Partner Tag provides a lightweight, secure JavaScript API for partner integrations. The tag is exposed through the global window.DemandbasePartnerTag object and supports simple, flat configuration options.

After the tag loads, call a single public method to execute the integration:

window\.DemandbasePartnerTag.fire();

Prerequisites

Before implementing the Partner Tag, you must have:

  • A valid Demandbase partner authentication key.
  • Access to include JavaScript on your website or application.

Basic Implementation

Define the global configuration before loading the script.

<script>
window.DemandbasePartnerTag = {
  auth: "YOUR_PARTNER_KEY_HERE",
  config: {
    enableLR: true,
    enableIX: true
  }
};
</script>

<script src="https://tag.demandbase.com/partnertag.min.js" async></script>

<script>
window.DemandbasePartnerTag.fire();
</script>

Global Object

The Partner Tag is available globally as:

window.DemandbasePartnerTag

The object contains:

PropertyDescription
authRequired partner authentication key
configOptional feature configuration
fire()Executes the Partner Tag

Authentication

The auth property is required.

Requirements:

  • Must be a top-level property of window.DemandbasePartnerTag.
  • Must be defined before the Partner Tag script loads.
  • Cannot be placed inside config.
  • Cannot be passed as a data-*script attribute.

Example:

window.DemandbasePartnerTag = {
  auth: "YOUR_PARTNER_KEY_HERE"
};

If the authentication key is missing or incorrectly configured, the Partner Tag fails to initialize.

Configuration

Configuration uses flat, top-level properties.

Property names are case-insensitive.

Supported configuration options:

PropertyDescription
enableLREnable LiveRamp integration.
enableIXEnable Index Exchange integration.
enableMCTVEnable MCTV integration.
enableRPEnable RP integration.
enableSmartPixelEnable Smart Pixel.
enableEmailDomainReporterEnable Email Domain Reporter.

Example:

window.DemandbasePartnerTag = {
  auth: "YOUR_PARTNER_KEY_HERE",
  config: {
    enableLR: true,
    enableIX: true,
    enableEmailDomainReporter: false
  }
};

Default Behavior

By default, all advertising integrations are enabled, along with:

  • Smart Pixel
  • Email Domain Reporter

The following rules apply:

ConfigurationBehavior
No advertising configuration providedAll advertising features remain enabled.
Any advertising option (enableLR, enableIX, enableMCTV, or enableRP)is specifiedUnspecified advertising options default to false.
enableSmartPixel: falseDisables Smart Pixel and all advertising integrations.
enableEmailDomainReporter: falseDisables only Email Domain Reporter.
Unsupported or nested configuration propertiesIgnored.

Configuration Methods

Configuration can be provided in two ways:

JavaScript Configuration

window.DemandbasePartnerTag = {
  auth: "YOUR_PARTNER_KEY_HERE",
  config: {
    enableLR: true
  }
};

HTML Data Attributes

<script
  async
  src="https://tag.demandbase.com/partnertag.min.js"
  data-enable-lr="true"
  data-enable-mctv="true"
  data-enable-email-domain-reporter="false">
</script>

Best Practice: Use data-* attributes when configuring the tag directly in HTML.

Configuration Precedence

If configuration is supplied in multiple locations, values are applied in the following order:

  1. window.DemandbasePartnerTag.config
  2. Script data-* attributes
  3. Default values

Initialization

The Partner Tag initializes automatically after the script loads.

After initialization, call:

window.DemandbasePartnerTag.fire();`

The method returns a Promise that resolves with the raw IP API response.

Example:

window.DemandbasePartnerTag.fire()
  .then(response => {
    console.log(response);
  });

Dynamic Script Loading

You can load the Partner Tag dynamically.

window.DemandbasePartnerTag = {
  auth: "YOUR_PARTNER_KEY_HERE",
  config: {
    enableLR: true,
    enableIX: true
  }
};

const script = document.createElement("script");
script.src = "https://tag.demandbase.com/partnertag.min.js";
script.async = true;

document.head.appendChild(script);

script.onload = () => {
  window.DemandbasePartnerTag.fire()
    .then(response => {
      console.log(response);
    });
};

Public API

The Partner Tag exposes a single public method.

fire() : Executes the Partner Tag and returns the raw IP API response as a Promise.

No additional methods or internal objects are publicly accessible.

Security and Best Practices

  • Internal classes and instances are not publicly exposed.
  • The Partner Tag cannot be reconfigured after initialization.
  • Configure the Partner Tag before loading the script. After the script loads, only the fire() method is supported.
  • If the auth key is missing, the Partner Tag fails to initialize and throws an error.
  • The auth key must be provided as the top-level auth property. Providing it as a script data-* attribute or inside config is not supported.

Additional Resources



Did this page help you?