I created a data element with the below custom code and have it firing on a pageload rule (bottom of page but also same results with top of page) in DTM. Everything looks good except I get a few instances of my strings I am passing but randomly truncated. (see image below). Is there a way to ensure the whole string gets passed appropriately?
var adBlockDetection = (function() {
var test = document.createElement('div');
test.innerHTML = ' '; //non-breaking space in div element
test.className = 'adsbox'; //"adsbox" is on the adblocker definition list and will get blocked
document.body.appendChild(test); // add the definition to the fake ad (div)
if (test.offsetHeight === 0) {
//console.log("AdBlocker Status: Active");
return "AdBlocker Status: Active";
} else {
//console.log("AdBlocker Status: None");
return "AdBlocker Status: None";
}
})();
return adBlockDetection;
Solved! Go to Solution.
Views
Replies
Total Likes
Have you been able to replicate this behavior yourself? It looks like it's happening less than 0.1% of the time so I imagine replicating it is going to be difficult. Have you done further analysis of the data to know where these hits are coming from? I'd like to know if they are isolated to a specific browser, region, mobile device, etc.
Views
Replies
Total Likes
HI Scott,
Ideally this shouldn't have been the case because eVar has a length of 255bytes and the "AdBlocker Status: Active" is less than it. Can you please share your DTM account details as well as URL of the website in a private message so that we can debug the issue at our end.
Thanks & Regards
Parit Mittal
Views
Replies
Total Likes
Have you been able to replicate this behavior yourself? It looks like it's happening less than 0.1% of the time so I imagine replicating it is going to be difficult. Have you done further analysis of the data to know where these hits are coming from? I'd like to know if they are isolated to a specific browser, region, mobile device, etc.
Views
Replies
Total Likes
Hi Scott,
Have you done further analysis of the data to know where these hits are coming from ?
Thanks & Regards
Parit Mittal
Views
Replies
Total Likes
Views
Likes
Replies