+ Reply to Thread
Results 1 to 2 of 2

Thread: Google Mobile Analytics - Pixel Rendering Issue

  1. #1
    Mobility Member Solutioneering knows how to spell .mobi
    Join Date
    Feb 2008
    Location
    UK
    Posts
    37

    Default Google Mobile Analytics - Pixel Rendering Issue

    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 over at PocketAffiliates.com

    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"];

  2. #2
    Mobility Member firemax knows how to spell .mobi firemax's Avatar
    Join Date
    Jan 2010
    Location
    Colombo
    Posts
    44

    Default

    i'm using too without any problem..

+ Reply to Thread

Similar Threads

  1. Replies: 0
    Last Post: 11-03-2009, 10:40 PM
  2. Google Upgrades Analytics To Improve Mobile Site Measurement
    By newdomainer in forum News & Discussion
    Replies: 1
    Last Post: 10-30-2009, 07:21 PM
  3. Bolt Browser 1.5 Review – Great Rendering, Copy/Paste
    By Scavenger in forum Mobile Industry News
    Replies: 0
    Last Post: 10-09-2009, 08:30 PM
  4. Finally...free 'google analytics' for mobile websites
    By GijsZePa in forum News & Discussion
    Replies: 2
    Last Post: 05-02-2008, 01:27 PM
  5. New Analytics Tool - Better than Google Analytics?
    By coast in forum News & Discussion
    Replies: 0
    Last Post: 02-11-2008, 10:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
A Yup.mobi Mobile Site
Mobile Dating