Hi, This is part GA question, part PHP question. I'm using Google Analytics. I want to set a user defined variable and then redirect the visitor. I have something like this: <script type="text/javascript">pageTracker._setVar('testuserdef')</script> <? header("Location: someurl"); exit(); ?> The problem is I get the error Warning: Cannot modify header information - headers already sent. So I guess calling _setvar is considered setting a header even though nothing is actually displayed. Does anyone know how I can do both: set a user-defined variable and then do a redirect? TIA.
Shouldn't headers be called before anything else on a page?? Couldn't you do it with a window.location script???