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

Adobe Analytics | Track API Responses & JavaScript Errors


Level 2

Anyone know the best way to track website API responses & Javascript errors within Adobe Launch? We want to record into eVars

1 Reply


Community Advisor

@Trystan_Colwyn- - If your API/request has a callback/response, I would suggest one of the following:

  • Push the information to your data layer (assuming you're using an event-driven data layer)
  • Use a direct call rule (DCR) that can be triggered directly in your callback
  • In your callback, trigger a custom JS event that you can listen for in Launch

All of the above options let you pass any information that is important to you.

For JS errors, I'd make the same suggestions. The only difference is the tracking event is triggered from your try/catch rather than an API callback/response.


Level 2

Thanks @Brian_Johnson_ !


dataLayer/directCall approach would be ideal, however we currently have some short term DEV challenges


Could you share more detail of your callback suggestion?  Maybe a particular example listening to a fetch API response? 


Community Advisor

@Trystan_Colwyn- - Using the first fetch() example here:

    function(response) {
      if (response.status !== 200) {
        console.log('Looks like there was a problem. Status Code: ' +

      // Examine the text in the response
      response.json().then(function(data) {
  .catch(function(err) {
    console.log('Fetch Error :-S', err);

... I see three places you might want to capture the data:

  1. Inside the if (response.status !== 200) {} conditional
  2. Inside the response.json().then() logic
  3. Inside the .catch()

For all three of those, you could fire off a direct call rule, passing a payload with whatever information you want to capture. Something like _satellite.track("fetch_tracker", { "api_name": "some.json", "status": "success" });