Search code examples
adobeadobe-analytics

DTM custom script firing, but not recording into report suite


In DTM I have created a page load rule with custom script. The script fires when a certain page is loaded and I can see in the debugger that our prop has been populated with the relevant data:

Adobe Analytics Server Call #3 (796 chars)
CUSTOM LINK        : Editorial Tracking Data
Report Suite ID    : sitespecificsuite,rollupsuite
Page Name          : site: siteid: detail
Current URL        : URL
Events             : event90
prop71             : 2015-11-14T06:00:00Z | Item 2 | Item 3
Currency Code      : GBP
JavaScript Version : 1.6
Version of Code    : H.25.2-D5NH
Data Centre        : Our data centre

The issue is that our DTM account is set up to send the data into a staging report suite and this is not appearing at all within our server call, I assume this is due to our Omniture hard coded tagging overriding this.

if(window.location.href.indexOf("story.html") > -1) {
 var meta="";
$('script[type="application/ld+json"]').each(function(i, script) {
var text = script.text;
var data = JSON.parse(text);

var meta = data.dateCreated + " | " + data.creator + " | " + data.headline;
console.log(meta);

   if (meta.length > 1) {
        s.prop71 = data.dateCreated + " | " + data.creator + " | " + data.headline;
    s.events='event90'
        s.linkTrackVars='prop71, events';
    s.linkTrackEvents='event90';
    s.tl(true, 'o', 'Editorial Tracking Data');}

});

The code above has been placed within the sequential javascript section of the page load rule. I have a feeling this issue is due to our hard coding overriding our new data and report suites but I am not sure.


Solution

  • Do you have the Adobe Analytics Tool added as part of DTM or are you also adding the s_code / app measurement file via third-party JS?

    If you are using the AA tool, I would suggest creating a page load rule that will fire the s.tl() if your code conditions are met. Doing so will force AA and DTM to use the s.object and set your variables without having to hard code them.

    You can add the manual call to the third-party JS but the timing and scope of the s.object can sometimes be problematic. Using the AA section of your page load rule will force DTM to work and send data as designed.

    Hope this helps.