Google Analytics: Prevent page title submission.

How to prevent page header tracking from being prevented? Installation _setDetectTitlein falsestill sends the page title in the request to the GA ( utmdt) server . Due to privacy issues, I don’t want the page title to leave the browser. Any ideas?

+3
source share
2 answers

_setDetectTitleworks great for me. You just need to call it before the call _trackPageview:

    var _gaq=_gaq||[];
    _gaq.push(['_setAccount','UA-XXXXXX-1']);
    _gaq.push(['_setDetectTitle', false]);    
    _gaq.push(['_trackPageview'])

You can compare the hit __utm.gif sent in the version with the _setDetectTitle parameter set to false compared to the sent in the standard version .

, utmdt , .

: ; .

Sends the page titleDoesn't send the page title

+7

, . , :

    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
        _gaq.push(['_setDetectTitle', false]);
        _gaq.push(['_trackPageview']);

        (function () {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
    </script>
+2

Source: https://habr.com/ru/post/1795681/


All Articles