Hi guys,
I'm using Adobe Client Data Layer as Event, so once the event is clicked the rule will be firing.
And I'm using the below code to set my variables. then Send Beacon then send variables, It gets fired in the console but im not able to see the firing in my debugger I'm using Omnibug.
s.linkTrackVars = "products,eVar7,eVar15,eVar3,prop1,prop29,prop30,eVar29,eVar31,prop31,eVar32,eVar33,eVar28";
s.linkTrackEvents = "scAdd,scView,scOpen,event12,event17";
s.events="scAdd,scView,scOpen,event12"
if(s.pageName) s.getPageLoadTime();
if(s._pltPreviousPage)
{
if (s.events == "undefined")
{
s.events = "event17=" + s._pltLoadTime;
}
else
{
s.events = s.apl(s.events,"event17="+s._pltLoadTime);
}
}
s.eVar3 = s.prop1 = _satellite.getVar('visitorID');
s.prop29 = s._pltLoadTime;
s.prop30 = s._pltPreviousPage;
s.eVar29 = s.prop30;
s.eVar31 = s.getVisitDuration();
s.prop31 = s.eVar31;
s.eVar32 = s.getVisitNum();
s.eVar33 = getTimeParting("America/New_York");
s.eVar28 = s.getTimeSinceLastVisit();
s.eVar7 =_satellite.cookie.get('emailHashed');
var status =_satellite.cookie.get('Login Status');
if(status != undefined)
{
s.eVar15 =_satellite.cookie.get('Login Status');
}
else
{
s.eVar15 = "Guest";
}
var discountPrice = $(".discountedPrice").text().slice(1).trim();
s.products = ";" + event.message.eventInfo["xdm:SKU"] + ";"+ event.message.eventInfo["xdm:quantity"] +";" + discountPrice;
console.log(s.products);
Solved! Go to Solution.
Views
Replies
Total Likes
So in your rule, you have this custom code block then you have your send beacon block, correct?
What operation is currently between those blocks?
Is it "THEN" or "WAIT, THEN"?
I see that you are using a lot of extensions here, it's possible that some of these are still running when your Send Beacon occurs, meaning that this information isn't yet completed.
THEN is essentially asynchronous.
Let's use a simple (exaggerated example):
You have code Block A that takes 10 seconds to run and you have code Block B that takes 0.5 seconds to run.
[Code Block A] THEN [Code Block B]
Code Block A starts, there might be a small 0.1 delay before Code Block B starts... this means that Code Block A only gets about 0.6 seconds through it's execution when Code B has completed.
You still see Code Block A complete (with it's console.log), but most of the information set in Code Block A never gets sent because Code Block B fired way too soon.
Try changing the condition between your blocks to "WAIT, THEN" which should say that Code Block A should complete before Code Block B is run.
On your custom code block, in the advanced settings you should see:
Enable this:
It will change this:
To:
If you don't see this option, you may have to adjust the settings on the property
Though, since you aren't really using the benefits of the Adobe Analytics Extension (and instead coding everything manually), why don't you just add the beacon code right into all your custom coding (where you have your console.log):
s.tl(true,"o","action name here");
Views
Replies
Total Likes
So in your rule, you have this custom code block then you have your send beacon block, correct?
What operation is currently between those blocks?
Is it "THEN" or "WAIT, THEN"?
I see that you are using a lot of extensions here, it's possible that some of these are still running when your Send Beacon occurs, meaning that this information isn't yet completed.
THEN is essentially asynchronous.
Let's use a simple (exaggerated example):
You have code Block A that takes 10 seconds to run and you have code Block B that takes 0.5 seconds to run.
[Code Block A] THEN [Code Block B]
Code Block A starts, there might be a small 0.1 delay before Code Block B starts... this means that Code Block A only gets about 0.6 seconds through it's execution when Code B has completed.
You still see Code Block A complete (with it's console.log), but most of the information set in Code Block A never gets sent because Code Block B fired way too soon.
Try changing the condition between your blocks to "WAIT, THEN" which should say that Code Block A should complete before Code Block B is run.
On your custom code block, in the advanced settings you should see:
Enable this:
It will change this:
To:
If you don't see this option, you may have to adjust the settings on the property
Though, since you aren't really using the benefits of the Adobe Analytics Extension (and instead coding everything manually), why don't you just add the beacon code right into all your custom coding (where you have your console.log):
s.tl(true,"o","action name here");
Views
Replies
Total Likes