Delay Server Call on a Specific Page | Community
Skip to main content
niroy
Level 2
December 17, 2021
Solved

Delay Server Call on a Specific Page

  • December 17, 2021
  • 1 reply
  • 1341 views

Hi

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

Regards
Roy

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Pablo_Childe

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

1 reply

Pablo_Childe
Community Advisor
Community Advisor
December 17, 2021

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?

niroy
niroyAuthor
Level 2
December 17, 2021

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.

Pablo_Childe
Community Advisor
Pablo_ChildeCommunity AdvisorAccepted solution
Community Advisor
December 17, 2021

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