custom 404 tracking adobe launch | Community
Skip to main content
September 10, 2024
Question

custom 404 tracking adobe launch

  • September 10, 2024
  • 2 replies
  • 619 views

How to track custom 404 tracking on websites using adobe launch web sdk , we have added the below steps and yet we get the return value as blanks

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

2 replies

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 10, 2024

Hi @dineshprasanth 

 

caution: in your example, you are fetching the whole website again which makes little sense and causes unnecessary network traffic and slows down your page.

 

Can you identify the error page somehow, meaning through its document title containing "404" or "error", or any other dom elements on the page which indicate an error?

 

That way you could create a data element that is just returning whether this information was found.

 

In your case of the "404 checker" it would rather look something like this

// use what ever you can use to detect an error page return document.title.includes("404") || document.title.includes("error");

If you cannot identify error pages, ask your developers to make it identifiable.

 

Hope that helps

Cheers from Switzerland!
September 10, 2024

@dineshprasanth Do you have data layer implemented on your site ? If yes than you can fetch the pageName or title from there. Your developer should have named it as 404 not found. That way you can check in the data element if the page title or name is 404 not found and return value as true or false.

If DataLayer is not implemented than you will have to play around DOM scrapping to fetch the value from right element.