Reputation: 21
I created a customized pageviews counter at my website, so i compared it with Google Analytics and Facebook Pixel data, and i noted they aren't tracking all the visits. Actually, GA is counting a lot less visits. However, i didn't identified a pattern. As an example, for page A, my counter show 34,010 pageviews, while GA shows 2,757. For page B, my counter shows 21,690, while GA shows 8,994. Facebook Pixel is counting fewer pageviews than GA. I also have Facebook pagelike plugin at the website. Here is my related code:
<head>
...
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-33363893-1', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<!-- Facebook Pixel -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');
fbq('init', '1552520671727240');
fbq('track', "PageView");
<?php
$p = $controller . ' - ' . $action;
switch($p){
case 'usuario - cadastrado':
echo "fbq('track', 'CompleteRegistration');";
break;
}
?>
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1552520671727240&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel -->
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.5&appId=1494091077554768";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
...
</body>
Any help?
Thanks in advance!
Upvotes: 0
Views: 618
Reputation: 884
No two trackers report exactly the same data. There are a number of reasons for this:
You should definitely check your implementation of these trackers on both pages; I recommend using Google Tag Manager, correctly placed immediately after the opening tag on each page, to deploy them all. This should make them give more similar results. However, you're never going to get the same numbers. You have to accept that each tracker does its own thing.
Upvotes: 1