I have a custom tracking system in place which works with an include of a .js file in the footer of each page. Unfortunately some high traffic sites are including images from my site which are already removed. therefor the 404 error page of my theme is frequenty hit and those users are registered aswell as website visitors even though I dont want them to count.
Long story short: I want to provent that tracking.js file to load on the 404 error page. What would be the best way to do that?
wp_enqueue_script()
?