Google Analytics and Facebook Pixel aren't tracking all visits
<p>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:</p>

<pre><code>&lt;head&gt;
...
        &lt;!-- Google Analytics --&gt;
        &lt;script&gt;
            (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');
        &lt;/script&gt;
        &lt;!-- End Google Analytics --&gt;

        &lt;!-- Facebook Pixel --&gt;
        &lt;script&gt;
            !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");
            &lt;?php
            $p = $controller . ' - ' . $action;
            switch($p){
                case 'usuario - cadastrado':
                    echo "fbq('track', 'CompleteRegistration');";
                break;
            }
            ?&gt;
        &lt;/script&gt;
        &lt;noscript&gt;&lt;img height="1" width="1" style="display:none"
                   src="https://www.facebook.com/tr?id=1552520671727240&amp;ev=PageView&amp;noscript=1"
            /&gt;&lt;/noscript&gt;
        &lt;!-- End Facebook Pixel --&gt;
&lt;/head&gt;

&lt;body&gt;
    &lt;div id="fb-root"&gt;&lt;/div&gt;
    &lt;script&gt;(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&amp;version=v2.5&amp;appId=1494091077554768";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));
    &lt;/script&gt;
    ...
&lt;/body&gt;
</code></pre>

<p>Any help?</p>

<p>Thanks in advance!</p>