Analytics
5.1K members online now
5.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

Tracking Codes For www & non-www Sites

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi Y'all,

 

Question on tracking www and non-www sites with GA. I just took over my company's website. I've set my preferred site as non-www in Search Console. I've implemented a redirect from the www to the non-www site. I'm running a WordPress website and have used the "Insert Headers & Footers" plug-in to insert tracking codes for both the www and non-www sites. 

 

In GA, the account is set up as the www. site, and in the "properties" list I have both the www and the non-www sites. However, these 2 sites have different tracking codes & show different data (different # of active users, etc) in the Analytics home page. Using the Google Tag Assistant I see the www. tag is not implemented correctly.

 

My questions;

 

1. How am I still seeing data for my www. site if the tracking code is not implemented properly?

2. With a 301 redirect, does GA funnel both www. and non-www data into the same data set?

3. Do I need to keep both tracking codes? Or, because of the redirect from www. to the non-www, can I leave only the tracking code for the non-www?

 

Thanks so much in advance y'all!

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Jake M
June

Tracking Codes For www & non-www Sites

Top Contributor
# 2
Top Contributor

Hi :-)

You only need a single tracking code and be sure the website url in the Property Settings and any View settings is updated to non-www if non-www is what is being redirected to.

 

For clarity and continuity of data, I would keep the original GA property and view(s) that was being used for tracking/reporting, and add an annotation in GA stating what date the change and redirection were implemented

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Jake M
June

Tracking Codes For www & non-www Sites

Top Contributor
# 2
Top Contributor

Hi :-)

You only need a single tracking code and be sure the website url in the Property Settings and any View settings is updated to non-www if non-www is what is being redirected to.

 

For clarity and continuity of data, I would keep the original GA property and view(s) that was being used for tracking/reporting, and add an annotation in GA stating what date the change and redirection were implemented

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Tracking Codes For www & non-www Sites

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks for clearing that up Bronwyn!

Tracking Codes For www & non-www Sites

Top Contributor
# 4
Top Contributor

You're welcome   :-)

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here