关于Demandbase属性在DTM中映射至Adobe Analytics变量的技术咨询
Hey there! I’ve helped several teams tackle this exact mapping task, so let me break down the step-by-step process for you—since you’ve already got the integration done, the hard part’s over!
First, Confirm Demandbase Data is Accessible
Before jumping into DTM, double-check that Demandbase is pushing its attributes to your page’s frontend. Open your browser’s developer console and run:
console.log(window.demandbase);
You should see an object with all the attributes from your table. Note the exact path to each attribute (e.g., window.demandbase.data.company_industry for a "Company Industry" attribute)—this is what you’ll use in DTM.
Step-by-Step Mapping in DTM
- Open your DTM Web Property and navigate to the Rules section.
- Create a new Rule (or edit an existing rule that fires for your Analytics tracking, like a Page Load rule).
- Set the trigger to match when you want the attributes sent (e.g., "Page Load" for all pages, or a specific page path).
- Add an Adobe Analytics Action:
- In the Rule’s Actions tab, click Add Action → select Adobe Analytics - Set Variables.
- Map your attributes:
- For each Adobe Analytics variable (eVar, prop, event) you want to populate, find its field in the Set Variables interface.
- Paste the Demandbase attribute path you noted earlier into the field. For example, if you’re mapping to
eVar1, enterwindow.demandbase.data.company_industrydirectly into the eVar1 input box. - Pro tip: If you need to handle edge cases (like empty values), use a Custom Code Action instead. For example:
// Get Demandbase attribute with fallback var dbIndustry = window.demandbase?.data?.company_industry || "Unknown"; // Assign to Analytics variable s.eVar1 = dbIndustry;
- Test and Publish:
- Save your rule and push it to your staging environment.
- Use the Adobe Analytics Debugger extension or check the network tab to verify that the variables are being sent correctly in the
imagerequest to Adobe.
Bonus: Use Data Elements for Flexibility
If you want to reuse these Demandbase attributes across multiple rules, create Data Elements first:
- Go to Data Elements → Create New.
- Set the type to Custom Script, then return the Demandbase attribute path (e.g.,
return window.demandbase.data.company_industry;). - Now, in your Analytics Set Variables action, you can select this Data Element instead of typing the path directly—makes updates easier later!
Quick Notes to Avoid Headaches
- Make sure the Demandbase script loads before your DTM Analytics rules fire. If you’re loading Demandbase asynchronously, add a condition to your rule to wait until
window.demandbaseexists. - Cross-reference your table’s friendly attribute names with the actual frontend variable paths—sometimes Demandbase uses slightly different keys in the object than the display names in documentation.
内容的提问来源于stack exchange,提问作者Michael Johns

