Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 4243

Problems with trackgoal and wrong visit count - Need help (no replies)

$
0
0
Sorry for double thread, delete - [forum.piwik.org]
So i have problem with visit count. When piwik tracking my custom goals, he duplicate/triggering visits for each goal. One visit is displayed as four or five for example. I dont know why piwik separate them. Should be one visit and it should contain all of these goals.



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

//// 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>
/// Tracking mouse move and click
$('body').click(function() {
     _paq.push(['trackGoal', 15]);
});
$('body').mouseover(function() {
	_paq.push(['trackGoal', 11]);
});
/// 
</script>

</body>


Viewing all articles
Browse latest Browse all 4243

Trending Articles