Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8906287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:36:56+00:00 2026-06-15T02:36:56+00:00

I have a website ( www.accent.jobs ) which contains a language selection tool on

  • 0

I have a website (http://www.accent.jobs) which contains a language selection tool on the www. subdomain.
When choosing a language, a cookie is set, so the user only sees the language selection page once, and automatically get redirected the right way next time.

What I notice in Analytics, is that traffic from the www to a subdomain (be.accent.jobs for instance) is seen as referral traffic.

What I do on the www. subdomain:

  • User clicks a link.
  • Javascript does an AJAX request to a PHP file which sets the cookie.
  • The user gets redirected through JavaScript using window.location.

When the user goes back to the www. subdomain, the redirect is done through PHP using a 302, without a page rendering.

Any ideas on how I could get the traffic from www. to a subdomain not to be handled as referral traffic in Analytics? I would like to keep the original referrer (the site that referred to http://www.accent.jobs) as the referrer in Analytics.

This is the tracking code on both the www and the be. subdomain:

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxx-xx']);
_gaq.push(['_trackPageview']);
_gaq.push(['_setDomainName', 'accent.jobs']);
_gaq.push(['_addIgnoredRef', 'accent.jobs']);
_gaq.push(['_addIgnoredRef', 'be.accent.jobs']);
_gaq.push(['_addIgnoredRef', 'nl.accent.jobs']);
_gaq.push(['_addIgnoredRef', 'ro.accent.jobs']);
_gaq.push(['b._setAccount', 'UA-xxxxxx-x']);
_gaq.push(['b._trackPageview']);
_gaq.push(['b._setDomainName', 'accent.jobs']);
_gaq.push(['b._addIgnoredRef', 'accent.jobs']);
_gaq.push(['b._addIgnoredRef', 'be.accent.jobs']);
_gaq.push(['b._addIgnoredRef', 'nl.accent.jobs']);
_gaq.push(['b._addIgnoredRef', 'ro.accent.jobs']); 
    
(function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

PS: I’m tracking on multiple UA accounts to keep the data in an older account as well, hence the ‘double’ tracking code.

Tries

  • Tried replacing the JavaScript redirect by server-side 302 header redirects in PHP, no luck.
  • Also tried using only JavaScript redirects, still no luck.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:36:58+00:00Added an answer on June 15, 2026 at 2:36 am

    Your _setDomainName usage is correct and sufficient.
    But its value is never send to Analytics : you must use it BEFORE _trackPageview.

    Then _addIgnoredRef is not useful anymore.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a url which could be www.website.com/order/?pg3=2 or www.website.com/orderstatus/?pg2= There could be several
I have a website which contains french, with accents é, è, à,.... The website
I have a website on www.example.com and use Google Analytics. I've also set up
I have a large website at www.mydomain.com. There are 1000 new documents per month
I have my personal website at www.yassershaikh.com, now I am planning to setup a
On my website www.staygold-design.com I have a fancybox jquery script on a button under
I have created a facebook website open graph application for my website www.heyngine.com. The
I am building a website www.etutornetwork.com, in top menu I have included a link
i have a website that is being hosted on www.webhost4life.com. Its a basic asp.net
i have an asp.net website http://www.site.com . This web app is also running on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.