Analytics
2.1K members online now
2.1K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

How Does a 301 Redirect Affect Referall Info and Do I need Cross Domain Trac

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hey everyone, thanks in advance for the help.
Here's the situation-


A client of mine used to have 3 different domains....

 

domainlong.com

domain.com

membershipsite.com

 

In addition to Google Analytics code on webinarjam.... 

 

(Note that we didn't have cross-domain tracking set up before)

 

We're moving everything to domain.com.   We have a landing page at domainlong.com/webinar-landing-page that we want to 301 redirect to domain.com/webinar-landing-page

 Would we need to set up cross-domain tracking for domainlong.com and domain.com or would adding domainlong.com to the exclusion list suffice?  

 

As of now we're planning to set up cross domain tracking for domain.com and webinarjam (since that's part of our sales funnel)

 

 

 

 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Shash
April 2017

How Does a 301 Redirect Affect Referall Info and Do I need Cross Domain Trac

Rising Star
# 2
Rising Star

Hi Shash,

 

You don't need to have any tracking on that page, the 301 redirect is server side, the page wont render in the client, GA won't load and will have no impact.  The only thing you should do is make sure that you pass all parameters that come in so that they make it through the redirect.  

 

Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Shash
April 2017

How Does a 301 Redirect Affect Referall Info and Do I need Cross Domain Trac

Rising Star
# 2
Rising Star

Hi Shash,

 

You don't need to have any tracking on that page, the 301 redirect is server side, the page wont render in the client, GA won't load and will have no impact.  The only thing you should do is make sure that you pass all parameters that come in so that they make it through the redirect.  

 

Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

How Does a 301 Redirect Affect Referall Info and Do I need Cross Domain Trac

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks Theo.  How do I make sure all the parameters come through?

How Does a 301 Redirect Affect Referall Info and Do I need Cross Domain Trac

Rising Star
# 4
Rising Star

Hi Shash,

 

That depends on your host.  With some you can do it in cPanel and with others you'll need to have the hosting company do it.   The point is that you need to make sure that any custom campaigns params make it through the redirect.   Smiley Happy

 

Best,

 

Theo Bennett

 

 

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

How Does a 301 Redirect Affect Referall Info and Do I need Cross Domain Trac

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hey Theo,

 

I had another question regarding cross-domain tracking that I posted right here-

 

https://www.en.advertisercommunity.com/t5/Google-Analytics-Code/Cross-Domain-Tracking-Help/td-p/1124...

 
Let me know your thoughts.  Thanks for all the help you've given me already.

How Does a 301 Redirect Affect Referall Info and Do I need Cross Domain Trac

Follower ✭ ☆ ☆
# 6
Follower ✭ ☆ ☆

I have been meaning to do some extensive testing about this (and write a blog post about it), so don't take this as certain without testing but I think it depends on the type of the redirect.

 

301, 302, 307, 308, etc?

 

Let's stick with 301...is it set up via DNS or via server?

 

You definitely want `domainlong.com/webinar-landing-page` to redirect to `domain.com/webinar-landing-page` but what about `HTTP` vs `HTTPS` and `www`?

 

(all should redirect to the preferred URL with only a single redirect...preferably a 301)

 

As Theo mentioned, you definitely don't want that redirect to be so slow that analytics tags have time to load/fire.

 

For correct attribution, you need to make sure the attributes of the original request are preserved (passed to the current server).

 

Check the referer, the path, and the query string (i.e. campaign tracking parameters) and make sure they are being forwarded/redirected correctly.

 

If a user on facebook.com clicks a link to `http://longdomain.com/landing-page?utm_source=facebook&utm_medium=social&utm_campaign=best_sale_ever` you want to be sure that the referer and campaign parameters are passed to the server with GA on it.

How Does a 301 Redirect Affect Referall Info and Do I need Cross Domain Trac

Rising Star
# 7
Rising Star

Hey Adam,

 

The Server side redirects should all be fine; again accounting for params, as they happen on the server and not the client (browser).  If someone is foolhardy enough to do it client side with the deprecated meta-refresh, for example, that's where your GA could fire. 

 

-Theo

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: How Does a 301 Redirect Affect Referall Info and Do I need Cross Domain Trac

Follower ✭ ☆ ☆
# 8
Follower ✭ ☆ ☆

Hi Theo,

I'm not sure if this is correct. I have dozens of domains with different types of redirects to a handful of sites (my own pet projects). They are registered through different registrars and/or hosted by different companies.

 

For the sake of clarity, I'll name them:

  • Google Domains
  • Namecheap
  • iPage

Each of them offers slightly different re-direct options; depending on the type of redirect I need, I might set it up at the DNS level or the server level (server level is needed if any request for any URL or sub-domain should be redirected to `/` of the new domain/site).

 

When I look through my sources report in GA, I see some of the re-directed domains listed as sources of referral traffic.

 

None of these are client side. They are either DNS 301 or 302 (Google Domains doesn't offer a 301 option) or server (Apache) 301 or 302.

 

Again, I haven't tested this but I have noticed it in my GA reports (and none of the domains/sites that are redirected even have GA code on them).

 

Even if parameters are preserved, if the referer is overwritten, it will cause attribution problems.