Expand my Community achievements bar.

Adobe Web SDK callback after successful event

Avatar

Level 2

Hi all,

This was something I managed to do prior to Web SDK using callbacks, but for AA and attribution to function correctly we need to ensure proper order of events. For example not letting passive custom links fire before the first page view of the visit.

 

Currently, we have Custom Link events that are firing as soon as the page loads which is causing attribution and pathing issues. 

My approach is then to use the 'On before event send callback' in the Web SDK extension to 'return false' if the event type is not a page view and the session page count is <1.

 

However, where I'm stuck is in the best practice to then fire the custom link(s) after the page view has successfully tracked.

One option was to create a queue, and then process that queue (if it exists) after the page view.

 

Another is simply to add a timeout to the custom links when session page count <1, but this has risks of the user navigating away or a slow connection. 

 

Has anyone approached this concept or have any ideas?

Thanks!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

3 Replies

Avatar

Level 2

Hi @aris-signet  - May i know the reason (are you collecting any data ..?) why you are firing custom links on page load? and the data whatever you are collecting from custom links is it available in your data layer (like history..)?

Avatar

Level 2

@mtummala54Thanks for joining in the conversation. We're tracking the presence of specific elements on the page, enters viewport logic...and also there is another vendor/team that is sending XDM payloads directly without my control...i know not best practice, org is only pushing for solution instead of following best practices, but also this is something I think GTM has handled for a while but Adobe has refused to build in similar functionality with real promises and rule order. 

 

Unfortunately there is no event history as neither of the troublesome events are part of an EDDL

 

I've put together a solution that isn't 100% effective so far, basically creating a queue using the Before Send Event options, I will post a link here later to what I've done so far

.

Avatar

Administrator

@aris-signet Did you find the suggested solutions helpful? It would be great if you can  mark the answer as correct for posterity. If you have found out solution yourself, share it with wider audience in the community.