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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Delay Server Call on a Specific Page

Avatar

Level 2

Hi

What would be the best method to delay a server call on a specific page?

Regards
Roy

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Ok great this helps. Ajax calls sort of can act like a SPA where the order of data being ready vs callback happening and in essence its a sort of race condition.

 

See this link here.

https://experienceleague.adobe.com/docs/analytics/implementation/other/ajax.html?lang=en

 

If this still doesn't work investigate a Direct call rule as well as then leveraging a Digital data layer. That way you could have more control over when header tag is fired, via direct call rule, then give page time enough to set all desired variables and then close off with page bottom snippet to complete the data capture and send.

 

GLTU

View solution in original post

2 Replies

Avatar

Community Advisor

There are many factors to give you an answer but...

 

Perhaps a Direct call rule. Can you expand on what is causing you issues? What platform/server environment you are on?

 

Is it a Single page app type of page?

Avatar

Level 2

Thanks a lot for your reply.

It's not a single page app. It's an ecommerce pages using Ajax and different Web methods calling runtime components. I am using callback function to capture information from the page but I am unable to pass it inside Adobe props, evars and the reason being server call happening well before callback function executes.

Avatar

Correct answer by
Community Advisor

Ok great this helps. Ajax calls sort of can act like a SPA where the order of data being ready vs callback happening and in essence its a sort of race condition.

 

See this link here.

https://experienceleague.adobe.com/docs/analytics/implementation/other/ajax.html?lang=en

 

If this still doesn't work investigate a Direct call rule as well as then leveraging a Digital data layer. That way you could have more control over when header tag is fired, via direct call rule, then give page time enough to set all desired variables and then close off with page bottom snippet to complete the data capture and send.

 

GLTU