Spoof referrer to Google Analytics?
        Posted  
        
            by Horace Loeb
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Horace Loeb
        
        
        
        Published on 2010-05-06T18:09:14Z
        Indexed on 
            2010/05/08
            2:58 UTC
        
        
        Read the original article
        Hit count: 352
        
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":

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)
© Stack Overflow or respective owner