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 775089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:14:01+00:00 2026-05-14T19:14:01+00:00

Whenever a user visits Page A on my site, I immediately redirect him to

  • 0

Whenever a user visits “Page A” on my site, I immediately redirect him to “Page B” by setting window.location with Javascript. “Page A” has no Google Analytics tracking on it — when someone is redirected from “Page A” to “Page B” I want to track him as if he entered the site via “Page B”. Unfortunately, my current setup breaks referrer information since people who are redirected to “Page B” appear to Google Analytics as if they came from “Page A”:

alt text http://dl.dropbox.com/u/2792776/screenshots/2010-05-06_1402.png

After users are redirected to “Page B”, I want to tell Google Analytics their “real” referrer (i.e., the referrer to “Page A”). How can I do this?

(Note: I realize that using a real HTTP redirect instead of a Javascript-based redirect would solve this problem. Unfortunately this isn’t an option)

  • 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-05-14T19:14:02+00:00Added an answer on May 14, 2026 at 7:14 pm

    The solution described in this blog post seems to work — I added this to “Page A”:

    <script type="text/javascript"> 
      var pageTracker = _gat._getTracker("UA-xxxxxx-11");
      pageTracker._initData();
    </script>
    

    Which seems to capture the initial referrer without recording duplicate pageviews

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

Sidebar

Related Questions

I want to set a cookie whenever a user visits a page, so not
I have created one preference page where there are stringfieldeditor. Whenever user give some
I have the code below to open a new window whenever user presses F2
Whenever a new user signs up on my site, I want to do some
I like to know like whenever user requests a jsp page we write hello.jsp
I'm developing an E-Commerce site and I want to set-up a Google Analytics Goal
I face a problem whenever the user tries to browse to second page via
I have table with following structure Whenever user click on checkbook and click on
I have implemented mail composer. But it opens mail composer whenever user had implemented
Whenever the user scrolls map or zooms in/out, this method gets called instantaneously. I

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.