We are using one Launch property for multiple domains. They are websites for people affiliated with our company. The sites are all created via a master template so they have the same structure but customized for each affiliate and they each have their own domain. There are hundreds of these templated sites.
Each click within the site (navigating around different pages within the site) fires an exit link. So there are two links for every page view within the site - the PV hit and an exit link hit. We need to remove the exit link hit; page views within the site should only send the PV hit.
Exit links need to be tracked as we have CTAs we need to track. Therefore, the issue is how to not track every page view within the site as an exit link but track actual exits from the templated site to another external site as an exit link.
I'm aware I can use s.trackExternalLinks to list out domains that are considered internal links and therefore not fire exit links; by adding this to the custom code tracker:
However, we have hundreds of sites and some could be added or removed even without my knowledge, so this method is not viable. Ideally, there should be logic where if new page domain is the same as the current page domain (meaning they are navigating within the same site, regardless what domain it is) then do not send an exit link hit. How would I make this happen? Or if anyone has other ideas, it would be appreciated.
@StewSchilling thanks, I tried your suggestion but it didn't work. It gave me an idea though that did.
In Analytics extension in Launch > Configure the tracker using custom code. I edited the code (there was existing code there already). I was already using s.trackExternalLinks in the custom code but made changes to it.