I'm setting a session variable on a non-zen cart page (ad tracking url), and then sending a 301 redirect to a zen cart product page. This is for tracking inbound clicks for an ad campaign.
Tracking page code:
PHP Code:
session_start();
$_SESSION['utm_source'] = $_GET['so'];
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.my-site.com/abcd-".$_GET['p'].".html");
exit();
Problem is, in the footer of the product page, $_SESSION['utm_source'] is suddenly empty! It seems something about zen cart is emptying/unsettling non-zen session variables?
If my tracking page redirects to another non-zen page the session var shows up just fine. I can also call:
PHP Code:
session_start();
echo $_SESSION['utm_source'];
...at the very begining of index.php (before require('includes/application_top.php');) and it shows up correctly.
On the line after the application_top.php include, the variable is empty.
Any ideas why this is?
Bookmarks