dc_jt Posted August 7, 2007 Share Posted August 7, 2007 Hi I want to redirect a url to the homepage but still track this in google analytics. Therefore my page, www.blahblah.com/blah/ needs to redirect to www.blahblah.com/index.php so I have created a folder called blah and index.php which only contains: <?php die(header("Location: /index.php")); ?> This redirects the user back, however will this still be tracked in google analytics? I need a quick answer please. Thanks Link to comment https://forums.phpfreaks.com/topic/63690-redirecting-to-homepage-quick-answer-please/ Share on other sites More sharing options...
jitesh Posted August 7, 2007 Share Posted August 7, 2007 header("Location:http://".$_SERVER['SERVER_NAME']."/index.php"); Link to comment https://forums.phpfreaks.com/topic/63690-redirecting-to-homepage-quick-answer-please/#findComment-317387 Share on other sites More sharing options...
dc_jt Posted August 7, 2007 Author Share Posted August 7, 2007 Thanks but will this still track that a user has clicked the url blahblah.com/blah/ ?? Link to comment https://forums.phpfreaks.com/topic/63690-redirecting-to-homepage-quick-answer-please/#findComment-317389 Share on other sites More sharing options...
ToonMariner Posted August 7, 2007 Share Posted August 7, 2007 Nope. Google analytics (love the fact that has the word anal at the start;)) works on the the javascript urchin that you place on your page. Unless you actuall let the page load that info will never bee sent to google. Link to comment https://forums.phpfreaks.com/topic/63690-redirecting-to-homepage-quick-answer-please/#findComment-317411 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.