Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Adobe Launch - Custom code firing pageview call not event call

madhussu
Level 1
Level 1

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

8 Replies
amgup
Level 7
Level 7

@madhussu  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 ?

madhussu
Level 1
Level 1
@amgup : Yes, s.tl() call is not firing for custom clickable events . whenever i do clickable event its firing pageview call s.t() NOT Custom Link Tracking s.tl()
amgup
Level 7
Level 7
Can you share a code snippet from where you are firing the call ?
madhussu
Level 1
Level 1

$('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();

madhussu
Level 1
Level 1

$('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(); });

jkm-disco
Level 5
Level 5

Hi @madhussu ,

 

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.

Willian_Z
Level 1
Level 1

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.