|
Hi All,
We've been experiencing some issues with the new Mobile Analytics Beta from Google. After a bit of experimentation we tracked it down to the passing of the absolute URL in the 'utmr' parameter to the ga.php file. After modifying the code as shown below (between Custom Start - Custom End) we get a consistently rendered pixel and should therefore start to gain accurate statistics once again... we'll check to see that actual pages are being registered correctly too over the coming days and report back.
We've posted on one of the Google forums that it was playing havoc with our bounce rates as the first page was always rendered due to the empty 'utmr' parameter. Any subsequent calls would then fail to register as the 'utmr' param would contain the absolute URL. If we here back from Big G then we'll let you know...
// Copyright 2009 Google Inc. All Rights Reserved. $GA_ACCOUNT = "MO-XXXXXXX-X"; $GA_PIXEL = "ga.php";
function googleAnalyticsGetImageUrl() { global $GA_ACCOUNT, $GA_PIXEL; $url = ""; $url .= $GA_PIXEL . "?"; $url .= "utmac=" . $GA_ACCOUNT; $url .= "&utmn=" . rand(0, 0x7fffffff);
$referer = $_SERVER["HTTP_REFERER"]; // Custom Start // Get rid of the absolute URL as this seems to cause a 404 when fetching the .gif $ref_arr = explode("/", $referer); $ref_count = count($ref_arr); $referer = $ref_arr[$ref_count-1]; // Custom End
$query = $_SERVER["QUERY_STRING"]; $path = $_SERVER["REQUEST_URI"];
|