GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   Google analytics and PHP redirection pages (https://gfy.com/showthread.php?t=1159198)

Smart Fred 01-17-2015 11:20 AM

Google analytics and PHP redirection pages
 
Hi guys,

From a few months I started using redirection pages to manage from one place my affiliation code I use on many galleries.

So I use such a code
Quote:

<?php
$agent = $_SERVER['HTTP_USER_AGENT'];
if (preg_match('/(iPod|iPhone|android|blackBerry|symbianOS|opera mini|windows CE|nokia|sonyericsson|webOS|palmOS)/i', $agent)) {
header("location: http://my-affiliation-link-to-mobile-tour");
} else {
header("location: http://my-affiliation-link-to-classic-tour");
}
?>
in an index.php file in such a directory http://my-domain.com/go/program/

But I feel completely unable to get Google analytics stats for such a page.
So I'm unable to compare the amount I sent with the amount received on the affiliation program, and I'm also unable to define this page as a goal in Google Analytics.

Is there anyway to use Google Analytics stats and goals for such redirection pages ?

Thanks for your help.

robber 01-19-2015 04:42 PM

Hi,

You need to go about tracking the link in a different way, it needs to be on the page of your site it's being clicked on instead, as the php redirect will not trigger the code as it executes pretty much instantaneously.

Take a look at the google article on how to work with analytics to track the outbound links

https://support.google.com/analytics...36920?hl=en-GB

Hope this helps

Rob

Smart Fred 01-20-2015 05:38 AM

Thanks Rob,
That should be what I need. I will try implement the outbound links on my site asap.

fappingJack 02-01-2015 06:15 AM

:thumbsup


All times are GMT -7. The time now is 01:38 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123