Hi Everyone,
I am facing issue with adobe image request in network tab, I can proper see results in console, but while in image request I am not seeing Evar55 current value.
Actually there is bug Analytics tracking issue- Evar55
Evar55 should capture the value of filter selected by users on search result page and PLP.
So now the next thing I have written the code, which is working absolutely fine in Console, and I can see the result but in network tab the image request is giving previous value not giving the current value of facet.
Here I am sharing the screenshot and code with you, please tell what issue is.
In DTM, I have created page load rule – conditions trigger rule at DOM ready –then adobe analytics open editor I have pasted this code
*********************************************************************
Code
var oldXHR = window.XMLHttpRequest;
function newXHR() {
var realXHR = new oldXHR();
realXHR.addEventListener("readystatechange", function() {
if(realXHR.readyState==4 && realXHR.status==200){
//run your code here
if(s.pageName && (s.pageName.indexOf('plp:')>-1 || s.pageName.indexOf('search')>-1)){
var PFF = document.getElementsByClassName('selected-categories')[0].innerText;
PFF_Final = PFF.replace(/ /g, '').replace(/:/g, '|');
if(PFF_Final.indexOf('Categories|')>-1 || PFF_Final.indexOf('search|')>-1){
}
else if(PFF_Final && typeof PFF_Final !== 'undefined' && PFF !== 'null' && PFF !== ''){
//PFF_Final = PFF.replace(/ /g, '').replace(/:/g, '|');
s.linkTrackVars = 'eVar91';
s.eVar91 = PFF_Final.trim();
//s.tl(this, 'o');
}
}
},1500);
}
}, false);
return realXHR;
}
Note : - I have change the Evar55 to Evar91 because Evar 55 which is already in use.
Thanks,
Payal
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Pay,
After taking a look at your implementation and rule, I'm assuming the problem is the order the code is firing. In your rule, you are setting most of the Analytics variables within the DTM UI. The variable you are having the issue with is set in the custom code section of the Analytics portion of the rule. I believe this code is being executed after the Analytics beacon has already fired. This is why you are able to call the data element in the console and retrieve the expected value.
My suggestion would be to move that code either into the conditions section before returning true or putting that code within the data element that sets eVar 55. You can then set eVar 55 = to the data element in the DTM UI. This will cause DTM to call the data element when the condition is met and before the beacon fires. When the rule calls the data element, the code within that data element will be run and your value can be assigned to the data element. When the value is retrieve from the data element, the rest of the Analytics code will fire and send of the Analytics beacon.
Try that and let's see if that fixes the issue.
Cheers,
Jantzen
Views
Replies
Total Likes
It sounds like you've got something overwriting your eVar55 variable. Based on your screenshots, when you switch DTM to set the product families to eVar 91 everything works as expected. Is that correct or did I misunderstand?
If that is correct, you'll want to find what is also trying to set eVar 55 and disable that rule.
Views
Replies
Total Likes
Hi Jantzen.Belliston & ParitMittal,
I am facing issue with evar 55 and prop 55.
Above one scenario which I mentioned is not correct, so I am posting the exact scenario.
I am facing issue with adobe image request in network tab, I can proper see results in console, but while in image request I am not seeing Evar55 current value. Actually there is bug Analytics tracking issue- Evar55
Evar55 should capture the value of filter selected by users on search result page and PLP.
So now the next thing I have written the code, which is working absolutely fine in Console, and I can see the result but in network tab the image request is giving previous value not giving the current value of facet.
Here I am sharing the screenshot and code with you, please tell what issue is.
but s.eVar55 is not showing value when first time filter click happened but from second time onwards it shows the previous value
"Code which i have written in adobe DTM custom editor"
if(_satellite.getVar("payal evar55/prop55 test") && _satellite.getVar("payal evar55/prop55 test") !== null){
s.linkTrackVars='eVar55,prop55';
s.eVar55=_satellite.getVar("payal evar55/prop55 test");
s.prop55=_satellite.getVar("payal evar55/prop55 test");
}
If anyone can help me out that would be highly appreciated.
Thanks,
Pay
Views
Replies
Total Likes
Hi Pay,
Is there a URL you can share where I can test this? Also, what is the name of the rule where you are setting eVar 55?
Thank you,
Jantzen
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi Pay,
After taking a look at your implementation and rule, I'm assuming the problem is the order the code is firing. In your rule, you are setting most of the Analytics variables within the DTM UI. The variable you are having the issue with is set in the custom code section of the Analytics portion of the rule. I believe this code is being executed after the Analytics beacon has already fired. This is why you are able to call the data element in the console and retrieve the expected value.
My suggestion would be to move that code either into the conditions section before returning true or putting that code within the data element that sets eVar 55. You can then set eVar 55 = to the data element in the DTM UI. This will cause DTM to call the data element when the condition is met and before the beacon fires. When the rule calls the data element, the code within that data element will be run and your value can be assigned to the data element. When the value is retrieve from the data element, the rest of the Analytics code will fire and send of the Analytics beacon.
Try that and let's see if that fixes the issue.
Cheers,
Jantzen
Views
Replies
Total Likes
Hi Jantzen.Belliston,
I tried your solution, but it's not working. Can you share your skypeid, so that i can share my screen and i will show you what is happening.
Views
Replies
Total Likes
Pay,
If you'd like to have someone share your screen and troubleshoot, you'll need to contact Customer Care. They have the tools and availability to setup a screen sharing session. If you do contact them, be sure to reference this thread so they can review what we've already tried.
Thanks,
Jantzen
Views
Replies
Total Likes
Sorry for giving you the late reply, I am not understanding how to set the condition and where, because already they have set so many variables in that section.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies