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.DemandbasePartnerTagThe object contains:
| Property | Description |
|---|---|
auth | Required partner authentication key |
config | Optional 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:
| 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. |
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:
| Configuration | Behavior |
|---|---|
| No advertising configuration provided | All advertising features remain enabled. |
Any advertising option (enableLR, enableIX, enableMCTV, or enableRP)is specified | Unspecified advertising options default to false. |
enableSmartPixel: false | Disables Smart Pixel and all advertising integrations. |
enableEmailDomainReporter: false | Disables only Email Domain Reporter. |
| Unsupported or nested configuration properties | Ignored. |
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:
window.DemandbasePartnerTag.config- Script
data-*attributes - 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
authkey is missing, the Partner Tag fails to initialize and throws an error. - The
authkey must be provided as the top-levelauthproperty. Providing it as a scriptdata-*attribute or insideconfigis not supported.
Additional Resources
- Demandbase IP-API v3 for Demandbase One
- Check API Response
- Understanding Site Analytics
- Firmographics Attributes Overview
Updated 10 days ago