New visitors

  1. The Visitor API is loaded, parsed, and executed.

  2. at.js / mbox.js is loaded, parsed, and executed.

  3. If global mbox auto-create is enabled, the Target JavaScript library:

    • Instantiates the Visitor object.
    • The Target library tries to retrieve Experience Cloud Visitor ID data.
    • Because this visitor is a new, the Visitor API fires a cross-domain request to demdex.net.
    • After Experience Cloud Visitor ID data is retrieved, a request to Target is fired.

Returning Visitors

  1. The Visitor API is loaded, parsed, and executed.

  2. at.js / mbox.js is loaded, parsed, and executed.

  3. If global mbox auto-create is enabled, the Target JavaScript library:

    • Instantiates the Visitor object.
    • The Target library tries to retrieve Experience Cloud Visitor ID data.
    • The Visitor API retrieves data from cookies.
    • After Experience Cloud Visitor ID data is retrieved, a request to Target is fired.
NOTE
For new visitors, when the Visitor API is present, Target has to go over the wire multiple times to make sure that Target requests contain Experience Cloud Visitor ID data. For returning visitors, Target goes over the wire only to Target to retrieve the personalized content.

Why does it seem like I see slower response times after upgrading from a previous version of at.js to version 1.0.0?

at.js version 1.0.0 and later fires all the requests in parallel. Previous versions execute the requests sequentially, meaning the requests are put in a queue and Target waits for first request to complete before moving on to the next request.

The way previous versions of at.js execute requests is susceptible to the so-called “head of line blocking.” In at.js 1.0.0 and later, Target switched to parallel request execution.

If you check the network tab waterfall for at.js 0.9.1, for example, you’ll see that next Target request doesn’t start until the previous one has finished. This sequence is not the case with at.js 1.0.0 and later where all the requests basically start at the same time.

From a response-time perspective, mathematically, this sequence can be summed like this

  • at.js 0.9.1: Response time of all Target requests = sum of requests response time
  • at.js 1.0.0 and later: Response time of all Target requests = maximum of requests response time

The at.js library version 1.0.0 completes the requests faster. In addition, at.js requests are asynchronous, so Target doesn’t block page rendering. Even if requests take seconds to complete, you still see the rendered page, only some portions of the page are blanked out until Target gets a response from the Target edge.