Expand my Community achievements bar.

Webinar: Adobe Customer Journey Analytics Product Innovations: A Quarterly Overview. Come learn for the Adobe Analytics Product team who will be covering AJO reporting, Graph-based Stitching, guided analysis for CJA, and more!

custom 404 tracking adobe launch

Avatar

Level 2

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

404.PNGcode.PNGrules.PNG

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

2 Replies

Avatar

Community Advisor

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!

Avatar

Level 2

@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.