Expand my Community achievements bar.

SOLVED

Launch property used in multiple domains

Avatar

Level 4

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:

s.trackExternalLinks = true;
s.linkInternalFilters = "website1.com,website2.com"; 

 

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.

1 Accepted Solution

Avatar

Correct answer by
Level 4

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

 

s.trackExternalLinks = true;
s.linkInternalFilters = "mysite.com,"+window.location.hostname;

 

As you can see, I added window.location.hostname which will be dynamic; i.e. the current site's hostname. This worked. It's been tested and published.

 

I'm still not sure why adding the hostname to never track didn't work. It sounds like it should. It works now so I will leave it alone. Thanks!

View solution in original post

2 Replies

Avatar

Community Advisor

Here's the trick:  

1) Create a data element as shown below

Screen Shot 2021-05-19 at 9.20.24 AM.png

 

2) In the Adobe Analytics extension configuration, under Link Tracking > Outbound Links > Never Track, add the "Hostname" data element created in step 1. 

Screen Shot 2021-05-19 at 9.22.28 AM.png

3) Save to Library and Build!

 

Cheers,

-Stew

 

Avatar

Correct answer by
Level 4

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

 

s.trackExternalLinks = true;
s.linkInternalFilters = "mysite.com,"+window.location.hostname;

 

As you can see, I added window.location.hostname which will be dynamic; i.e. the current site's hostname. This worked. It's been tested and published.

 

I'm still not sure why adding the hostname to never track didn't work. It sounds like it should. It works now so I will leave it alone. Thanks!