Sha256: 816eae1132b76e466085b953982d5990ba60a6d95811db2378254131bea92c8b

Contents?: true

Size: 669 Bytes

Versions: 127

Compression:

Stored size: 669 Bytes

Contents

<?php
  //  Copyright 2009 Google Inc. All Rights Reserved.
  $GA_ACCOUNT = "ACCOUNT ID GOES HERE";
  $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"];
    $query = $_SERVER["QUERY_STRING"];
    $path = $_SERVER["REQUEST_URI"];

    if (empty($referer)) {
      $referer = "-";
    }
    $url .= "&utmr=" . urlencode($referer);

    if (!empty($path)) {
      $url .= "&utmp=" . urlencode($path);
    }

    $url .= "&guid=ON";

    return $url;
  }
?>

Version data entries

127 entries across 127 versions & 5 rubygems

Version Path
middleman-core-x86-mingw32-3.0.5 lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-3.0.5 lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-x86-mingw32-3.0.4 lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-3.0.4 lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-x86-mingw32-3.0.3 lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-x86-mingw32-3.0.2 lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-3.0.2 lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-x86-mingw32-3.0.1 lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-x86-mingw32-3.0.1.pre lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-3.0.1.pre lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-2.0.16.1-x86-mingw32 lib/middleman/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-2.0.16.1 lib/middleman/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-3.0.0 lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-3.0.0.rc.4 lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-3.0.0.rc.3 lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-2.0.16-x86-mingw32 lib/middleman/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-2.0.16 lib/middleman/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-2.0.15.4-x86-mingw32 lib/middleman/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-2.0.15.4 lib/middleman/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet
middleman-core-3.0.0.rc.2 lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet