AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
1.4K members online now
1.4K members online now
Learn to identify referral spam traffic, as well as best practices to reduce referral spam in your Google Analytics account
 
Guide Me
star_border
Reply

Excluding subdirectory referral instead of domain

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello!

I would like to exclude referrals from bank payment lists. Let's say the URL is www.bank.com/payment. 

At the same time we might have traffic coming from that bank as banks are used for authentication. Then the user would start the session at the bank and move to our page from URL www.bank.com/authentication. In that case I want to count that referral and that session. 

 

How can I exclude www.bank.com/payment without excluding the domain www.bank.com ?

 

Thank you,

Karin

Excluding subdirectory referral instead of domain

A T
Participant ✭ ✭ ✭
# 2
A T
Participant ✭ ✭ ✭

I don't think it will be feasible.

 

Did you try it with some filters.

Excluding subdirectory referral instead of domain

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

No, I haven't tried filters yet, I was still wondering if the referral exclusion list could work in that way. What filter would you propose to exclude traffic from a specific page?

Re: Excluding subdirectory referral instead of domain

[ Edited ]
Participant ✭ ✭ ✭
# 4
Participant ✭ ✭ ✭

Tsau Karin Smiley Happy

 

I've tested it out. If you're running Google Tag Manager on your site, you can use this kind of Custom JavaScript variable in GTM in order to exclude referrals only from bank payment lists:

 

function() {
  return {{Referrer}}.indexOf('www.bank.com/payment') > -1 ? null : 
{{Referrer}};
}

 

It looks like that in GTM:

 

 Screen Shot 2017-01-08 at 11.53.31.png

 

That will return true if the referrer has your bank payment URL, and then you can use this in your tag which fires on the thank you page. It's not that simple solution but it works.

 

Cheers,

Taavi

Excluding subdirectory referral instead of domain

Follower ✭ ☆ ☆
# 5
Follower ✭ ☆ ☆

I realised this might impact a lot more people!

Since a lot of pages are using Facebook login, then they get Facebook referral from facebook.com/v2.4/dialog/oauth or something similar!

Taavi, would your solution work with that as well? Or is there any other known solution for the FB authentication topic?

Re: Excluding subdirectory referral instead of domain

[ Edited ]
Participant ✭ ✭ ✭
# 6
Participant ✭ ✭ ✭

Hey,

 

Yes, can use this Custom JS:

 

function() {
  return {{Referrer}}.indexOf('facebook.com/v2.4/dialog/oauth') > -1 ? null : 
{{Referrer}};
}

 

Or if you're driving people to the specific page after the authentication, you can modify this custom JS to look at document.referrer in addition to the current page path. 

 

function() {
  return {{Page Path}}.indexOf('/page-after-authentication/') > -1 && document.referrer.indexOf('facebook.com') > -1 ? null : document.referrer;
}

 

It works like that - it returns null if the page is /page-after-authentication and the referrer has the string facebook.com and in all other cases it will return the referrer.

 

You should test it out first before you apply this to your main property.

 

Hope this helps.

 

Cheers,

Taavi