CardinalPath / gas

Google Analytics on Steroids. A Google Analytics implementation with more power features.
Other
593 stars 78 forks source link

anonymizeIP not working #28

Closed resolutionmediagermany closed 12 years ago

resolutionmediagermany commented 12 years ago

Hi, anonymizeIP is not working as expected (aip=1 cannot be found). Seems to be a bug.

eduardocereto commented 12 years ago

I'll check. Thanks,

Are you using like this?

_gas.push (['_gat._anonymizeIp']);
eduardocereto commented 12 years ago

@analyticsewolff Please try v1.9

https://github.com/CardinalPath/gas/downloads

alamarch commented 11 years ago

Using _gas.push (['_gat._anonymizeIp']); with v1.10.1 still unable to see aip=1 in the utm.gif header string. Any other way to verify anonymizeIP is functional?

resolutionmediagermany commented 5 years ago

@alamarch Hi. Maybe just a little bit late... )) But we had this issue again, and solved it finally by declaring _gaq and changing _gas.push to _gaq.push for the _gat._anonymizeIP push. That helped and we could see aip=1.

var _gas = _gas || [];var _gaq = _gaq || [];
        _gas.push(['_setAccount', 'UA-XXYYZZ-17]);
        _gas.push(['_setAllowAnchor', true]);
        _gaq.push(['_gat._anonymizeIp']); //  <= HERE
        _gas.push(['_setDomainName', '.earth.moon']);
        _gas.push(['_setAllowLinker', true]);
        _gas.push(['_addOrganic', 'suche.gmx.net', 'su']);
        _gas.push(['_addOrganic', 'suche.t-online.de', 'q']);
        _gas.push(['_addOrganic', 'suche.web.de', 'su']);
        _gas.push(['_trackPageview']);
        _gas.push(['_gasTrackForms']);
        _gas.push(['_gasTrackOutboundLinks']);
        _gas.push(['_gasTrackDownloads']);
        _gas.push(['_gasTrackYoutube', 'force']);
        _gas.push(['_gasTrackMailto']);
    (function() {
        var ga = document.createElement('script');
        ga.id = 'gas-script';
        ga.setAttribute('data-use-dcjs', 'false'); // CHANGE TO TRUE FOR DC.JS SUPPORT
        ga.type = 'text/javascript';
        ga.async = true;
        ga.src = 'https://cdnjs.cloudflare.com/ajax/libs/gas/1.11.0/gas.min.js';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(ga, s);
    })();