Here is the code of my piwik:
The problem is: When piwik tracking thiese custom goals, he duplicate visits. One visit is displayed as five for example.
Here some screenshots:
<head> <script src="flash.js"></script> <!-- Piwik --> <script type="text/javascript"> var _paq = _paq || []; _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u=(("https:" == document.location.protocol) ? "https" : "http") + "://site.ru/stats//"; _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setSiteId', 1]); 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+'piwik.js'; s.parentNode.insertBefore(g,s); })(); </script> <script type="text/javascript"> var reff = /reff=(.+)/ig.exec(document.URL); if(reff != null) { piwikTracker.setCustomVariable(1,"reff", reff[1], "visit" ); } //// REFERRER if (document.referrer != null) { _paq.push(['trackGoal', 10]); } //////////// //// JAVA if (navigator.javaEnabled()) { _paq.push(['trackGoal', 12]); } //////// ///// COOKIE if (document.cookie.length > 0) { _paq.push(['trackGoal', 13]); } //// ///// FLASH if(FlashDetect.installed){ _paq.push(['trackGoal', 14]); } ///// /// PROXY <?php include('proxy.php'); $myProxy = new proxyCheck(); $myProxy->serverVar = $_SERVER; $headers = $myProxy->checkHeder(); if ( isset($headers['HTTP_X_FORWARDED_FOR']) || isset($headers['HTTP_VIA']) ) { echo ' _paq.push([\'trackGoal\', 16]); '; } ?> //// </script> <noscript><p><img src="http://site.ru/stats/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript> <!-- End Piwik Code --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> </head> <body> <script> $('body').click(function() { _paq.push(['trackGoal', 15]); }); $('body').mouseover(function() { _paq.push(['trackGoal', 11]); }); </script> </body>
The problem is: When piwik tracking thiese custom goals, he duplicate visits. One visit is displayed as five for example.
Here some screenshots: