Demandbase Partner Tag
The Demandbase Partner Tag provides a lightweight JavaScript API for partner integrations. The tag uses the global window.DemandbasePartnerTag object for authentication and feature configuration.
After the Partner Tag initializes, use the fire() method to execute the integration:
window.DemandbasePartnerTag.fire();Follow Demandbase Partner Tag Implementation Requirements
Follow these requirements when implementing the Demandbase Partner Tag:
- Define authentication and configuration before loading the Partner Tag script.
- Do not attempt to reconfigure the Partner Tag after initialization.
- After initialization, use only the public
fire()method.
Prerequisites for Implementing the Demandbase Partner Tag
Before implementing the Demandbaes Partner Tag, you must have:
- A valid Demandbase partner authentication key.
- Access to add JavaScript to your website or application.
Implement the Demandbase Partner Tag
Configure the Demandbase Partner Tag
Define the global window.DemandbasePartnerTag object before loading the Partner Tag script. Add the authentication key as the top-level auth property and add optional feature settings inside config.
<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>Understand the Demandbase Partner Tag Global Object
The Demandbase Partner Tag is available through the global `window.DemandbasePartnerTag object.
The object contains:
| Property | Description |
|---|---|
auth | Required partner authentication key |
config | Optional feature configuration |
fire() | Executes the Partner Tag |
Configure Demandbase Partner Tag Authentication
The auth property contains the required partner authentication key.
Configure auth according to these requirements:
- Add
authas a top-level priority ofwindow.DemandbasePartnerTag. - Define
authbefore the Partner Tag script loads. - Do not add
authinsideconfig. - Do not provide
authas a scriptdata-*attribute.
If the authentication key is missing or incorrectly configured, the Partner Tag fails to initialize.
Example
window.DemandbasePartnerTag = {
auth: "YOUR_PARTNER_KEY_HERE"
};Configure Demandbase Partner Tag Features
Add optional feature settings directly inside the config object. Property names are case-insensitive.
The following configuration options are supported:
| Property | Description |
|---|---|
enableLR | Enable LiveRamp integration. |
enableIX | Enable Index Exchange integration. |
enableMCTV | Enable MCTV integration. |
enableRP | Enable RP integration. |
enableSmartPixel | Enable Smart Pixel. |
enableEmailDomainReporter | Enable Email Domain Reporter. |
Unsupported or nested configuration properties are ignored.
Example:
window.DemandbasePartnerTag = {
auth: "YOUR_PARTNER_KEY_HERE",
config: {
enableLR: true,
enableIX: true,
enableEmailDomainReporter: falseUnderstand Default Demandbase Partner Tag Configuration
By default, all advertising integrations are enabled, along with Smart Pixel and Email Domain Reporter.
The following rules determine how configuration changes affect these defaults:
| Configuration | Behavior |
|---|---|
| No advertising configuration provided | All advertising features remain enabled. |
| Any advertising option is specified | Advertising options that are not specified default to false. |
enableSmartPixel: false | Disables Smart Pixel and all advertising integrations. |
enableEmailDomainReporter: false | Disables only Email Domain Reporter. |
| Unsupported or nested properties | The properties are ignored. |
Advertising options include enableLR, enableIX, enableMCTV, and enableRP.
For example, if you specify only enableLR: true, the other advertising options default to false.
Choose a Demandbase Partner Tag Configuration Method
Configure the Partner Tag with JavaScript
Use the config object to define feature configuration in JavaScript:
window.DemandbasePartnerTag = {
auth: "YOUR_PARTNER_KEY_HERE",
config: {
enableLR: true
}
};Configure the Partner Tag with HTML Data Attributes
Use data-* attributes to configure Partner Tag features directly on the script element:
<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>The authentication key cannot be provided with a data-* attribute. Define the required auth property on window.DemandbasePartnerTag before the script loads.
Understand Demandbase Partner Tag Configuration Precedence
If configuration is supplied in multiple locations, the Partner Tag applies values in the following order:
window.DemandbasePartnerTag.config- Script
data-*attributes - Default values
Use the Demandbase Partner Tag fire() Public API
The Demandbase Partner Tag exposes a single public method:
fire() : Executes the Partner Tag and returns the raw IP API response as a Promise.
The Partner Tag initializes automatically after the script loads. After initialization, call:
window.DemandbasePartnerTag.fire();`To access the raw IP API response returned by the Promise:
window.DemandbasePartnerTag.fire()
.then(response => {
console.log(response);
});No additional methods or internal objects are publicly accessible.
Load the Demandbase Partner Tag Dynamically
You can load the Partner Tag dynamically instead of including the script directly in your HTML.
Define authentication and configuration before adding the script to the page:
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);
});
};Additional Resources
Updated 20 days ago