diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-10-30 08:56:57 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-10-30 08:56:57 +0400 |
commit | 8f67a195cb52b5879bed407c9d7392dcec527e67 (patch) | |
tree | 8ac130b85cf51ca5cfae0a25ab0b8712de4ded43 /misc/others | |
parent | 9206f7d2639e2a6a279f000f772962e08cf17fcc (diff) |
Fix setrawcookie error message
Diffstat (limited to 'misc/others')
-rw-r--r-- | misc/others/tracker_simpleImageTracker.php | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/misc/others/tracker_simpleImageTracker.php b/misc/others/tracker_simpleImageTracker.php index 373ed31474..30f6c2b211 100644 --- a/misc/others/tracker_simpleImageTracker.php +++ b/misc/others/tracker_simpleImageTracker.php @@ -1,14 +1,29 @@ +<?php +// -- Piwik Tracking API init -- +require_once "../../libs/PiwikTracker/PiwikTracker.php"; +PiwikTracker::$URL = 'http://localhost/piwik-master/'; +// Example 1: Tracks a pageview for Website id = {$IDSITE} +$trackingURL = Piwik_getUrlTrackPageView($idSite = 16, $customTitle = 'This title will appear in the report Actions > Page titles'); + +?> <html> <body> +<!-- Piwik --> +<script type="text/javascript"> + var _paq = _paq || []; + (function() { + var u=(("https:" == document.location.protocol) ? "https" : "http") + "://localhost/piwik-master/"; + _paq.push(["setTrackerUrl", u+"piwik.php"]); + _paq.push(["setSiteId", "16"]); + var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript"; + g.defer=true; g.async=true; g.src=u+"js/piwik.js"; s.parentNode.insertBefore(g,s); + })(); +</script> +<!-- End Piwik Code --> This page loads a Simple Tracker request to Piwik website id=1 <?php -// -- Piwik Tracking API init -- -require_once "../libs/PiwikTracker/PiwikTracker.php"; -PiwikTracker::$URL = 'http://example.org/piwik/'; -// Example 1: Tracks a pageview for Website id = {$IDSITE} -$trackingURL = Piwik_getUrlTrackPageView($idSite = 1, $customTitle = 'This title will appear in the report Actions > Page titles'); echo '<img src="' . htmlentities($trackingURL) . '" alt="" />'; ?> </body> |