Link Tracking in DTM | Community
Skip to main content
Level 2
February 9, 2017
Solved

Link Tracking in DTM

  • February 9, 2017
  • 3 replies
  • 1823 views

hi ,

I am bit new to DTM , I am working on tracking external links .

I have 2 websites with below domain  , same DTM code runs for both .

https:/abc-xyz.test.com
https:/def-xyz.test.com

Suppose i have a external link www.google.com

If i add in Never track section  , below URL 
will it cover both the domains  and will this  solution will be enough,
any other link apart from below mentioned  will be treated as external link,
or need to write custom code in some manner .

https:/*-xyz.test.com

Thanks

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

You likely could as almost anything is possible with custom code. If you wanted to go that route, you'd need to suppress page load beacons by having your function return false in the Analytics tool. You'd also need to write a custom condition for event-based rules. I'd recommend writing a script inside a data element and reusing that data element as a condition in each of your event based rules. Keep in mind, this is going to create a bit of overhead as each rule that may fire on those domains will need to have the data element as a condition.

3 replies

jantzen_b
Adobe Employee
Adobe Employee
February 9, 2017

Hi,

I was able to test this on a locally hosted site today and it doesn't look like the "Never Track" field supports regex. You'd need to add each domain you wish to ignore separately.

If you have the same web property deployed over both of those domains,  you may want to edit your property and utilize the "This site spans multiple domains" setting. You can learn more in our documentation here.

 

Cheers,
Jantzen

Level 2
February 9, 2017

hi ,

Thanks , 

can i custom code for above requirement or  not 

jantzen_b
Adobe Employee
jantzen_bAdobe EmployeeAccepted solution
Adobe Employee
February 9, 2017

You likely could as almost anything is possible with custom code. If you wanted to go that route, you'd need to suppress page load beacons by having your function return false in the Analytics tool. You'd also need to write a custom condition for event-based rules. I'd recommend writing a script inside a data element and reusing that data element as a condition in each of your event based rules. Keep in mind, this is going to create a bit of overhead as each rule that may fire on those domains will need to have the data element as a condition.