Javascript - when a tracking call has completed?

pwolly-cr

22-09-2020

Hello!
Does anyone know if there is a reliable way in javascript to detect whether the adobe analytics page tracking call (s.t()) has completed?  Currently, we are attempting to test for this via the below javascript (that tries to determine the state of the image beacon added to the page):
 
var pageViewComplete = function(){
    var pageViewPixel = window.s_i_scglobal;
    if (pageViewPixel && pageViewPixel.src && (pageViewPixel.src.indexOf('/b/ss/') >= 0) && pageViewPixel.complete){
      return true;
    }
    return false;
  };
 
We have noted that on occasion, the page view is recorded via an AJAX post to our adobe server vs the inclusion of the <img> tag, so the above code doesn't not always work.
 
Is there any Adobe supported way to test for this?
 
Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

evolytics_brian

22-09-2020