Hi Team,
We created one custom javascript rule where we firing custom evar , props and events using custom code and firing custom event but becone is firing pageview call not event call.
please help us how to fire custom code events by event call not by pageview.
Thanks & Regards,
Madhusudan Sura | madhusudan.sura@mindtree.com
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Madhusudan_S ,
I would be cautious with the approach in your custom code. There will be a race condition around firing beacon and clearing the variables. Not sure how Launch handles this behind the sences, but Adobe's documentation suggests registering a clearVars() callback using registerPostTrackCallback(), reference .
This way you can ensure that the variables are only cleared after sending the beacon.
As a second note, once you've registered a callback, it is set until you make a new instance of the tracking object. That is, if you've defined "s" as the global tracking, App Measurement object, then registered the callback, all track calls will clear variables. If you don't want to have all calls clear the variables, you'll need to combine this method with something else that will either re-define the s object afterwards and/or use s_gi() to set a dummy object for this purpose, reference.
Oh, third thing, you probably want to pass the first parameter in tl() as true, to see if the delay is causing you an issue, reference.
Views
Replies
Total Likes
@Madhusudan_S Are you saying that s.tl() call is not firing or the custom events are not being fired in a pageview or a custom link call ? Which event call you are referring to here ? Two beacon calls can be fired :-
A) Page View [s.t()]
B) Custom Link Tracking Call [s.tl()]
Which event call you are referring to here ?
Views
Replies
Total Likes
$('a[href="xxxxx.html"]').click(function(){ s.linkTrackVars="eVar53,prop11,events"; s.linkTrackEvents="event31"; s.events="event37"; s.eVar53= "xxxxxx - Sign In Clicked"; s.prop11= "xxxx - Sign In Clicked"; s.tl(this,'o', "xxxxxx - Sign In Clicked"); s.clearVars();
Views
Replies
Total Likes
$('input[name="xxxxxxxxxxxxxx"]').click(function(){ s.linkTrackVars="eVar53,prop11,events"; s.linkTrackEvents="event37"; s.events="event37"; s.eVar53=s.prop11= "xxxxxxxx - Authorizaion for text message: User Interacted"; s.tl(this,'o',s.evar53); s.clearVars(); });
Views
Replies
Total Likes
Can you share the custom code here?
Views
Replies
Total Likes
Hi @Madhusudan_S ,
I would be cautious with the approach in your custom code. There will be a race condition around firing beacon and clearing the variables. Not sure how Launch handles this behind the sences, but Adobe's documentation suggests registering a clearVars() callback using registerPostTrackCallback(), reference .
This way you can ensure that the variables are only cleared after sending the beacon.
As a second note, once you've registered a callback, it is set until you make a new instance of the tracking object. That is, if you've defined "s" as the global tracking, App Measurement object, then registered the callback, all track calls will clear variables. If you don't want to have all calls clear the variables, you'll need to combine this method with something else that will either re-define the s object afterwards and/or use s_gi() to set a dummy object for this purpose, reference.
Oh, third thing, you probably want to pass the first parameter in tl() as true, to see if the delay is causing you an issue, reference.
Views
Replies
Total Likes
Hello!
How is your Launch rule being fired? As I see it is not the rule itself that fires the beacon, but rather the function you're adding to the HTML objects via jquery, so maybe there's a context issue there. Do you have any errors in your console when you click on the related elements?
I would recommend instead of using the custom code in the function to fire the beacon programatically to call _satellite.track() and manage things inside another rule using Launch interface and AA extension.
Good luck.
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies