Anyone know the best way to track website API responses & Javascript errors within Adobe Launch? We want to record into eVars
Solved! Go to Solution.
@Trystan_Colwyn- - If your API/request has a callback/response, I would suggest one of the following:
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.
@Trystan_Colwyn- - If your API/request has a callback/response, I would suggest one of the following:
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.
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?
Views
Replies
Total Likes
@Trystan_Colwyn- - Using the first fetch() example here:
fetch('./api/some.json') .then( function(response) { if (response.status !== 200) { console.log('Looks like there was a problem. Status Code: ' + response.status); return; } // Examine the text in the response response.json().then(function(data) { console.log(data); }); } ) .catch(function(err) { console.log('Fetch Error :-S', err); });
... I see three places you might want to capture the data:
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" });
Views
Replies
Total Likes
Views
Likes
Replies