Host ga.js locally, not analytics.js
-
The plugin is working very well… it is using the actual analytics.js. Is there a way to tell the plugin that it should use the older oga.js instead?
-
I guess I could implement that. Could you tell me what the difference is?
Great… Sorry about the typo (ga.js instead of oga.js)
Thought this is still possible, because it’s in the plugin description.
Reason is, that I do not need the “newer” analytics functionalities like cross device tracking. From an GDPR point of view it is an extra trust point if I have in my data privacy a statement like this:
a) I use tracking in an older verson without cross-deviice tracking to respect privacy most.
b) Analytics helps me to improve…. Please let this minimal trackin enabled
It would be amazing if you could implement a switch where I can choose between the different js files (ga,js, analytics.js, gtag.js) which I want to use.
- This reply was modified 4 years, 11 months ago by hatschiii.
Gtag.js isn’t going to work. But I can definitely add a switch to use ga.js instead. I’ll add it in a new release.
perfekt! 🙂 thanks daanvandenbergh
looking forward into the next release!When do you think will the new version be available?
I don’t know yet, @hatschiii. I’ve been insanely busy with work and any free time I have I’m spending with my family. But as soon as I’ve time, I’ll implement the new features.
cool 🙂 thanks daan
Just wanted to let you know that the new release contains the feature you requested! 😀
Great! Thanks so much @daanvandenbergh
I use the default setting and have deactivated all caching, security, etc. plugins for testing.
If I switch to analytics.js, everything is working
If I switch to ga.js, nothing will be trackt in Google AnalyticsHave you clicked on the download button after saving your settings?
It might be due to the fact that the ga.js file doesn’t exist yet.
Yes, I have… also doubleckecked if the file is stored. Update is working also as well as the CAOS code (is shown in the source-code of the website).
Here is the code generated by the analytics.js:
<!-- This site is running CAOS: Complete Analytics Optimization Suite for WordPress --> <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', 'https://domain.com/wp-content/cache/caos-analytics/analytics.js', 'ga') window['ga-disable-UA-111111111-1'] = false ga('create', 'UA-111111111-1', { 'cookieName': 'caosLocalGa', 'cookieDomain': 'domain.com', 'cookieExpires': '172800' } ) ga('set', 'displayFeaturesTask', null) ga('set', 'anonymizeIp', true) ga('send', 'pageview')</script>
….an here is the generated cote by the ga.js:
<!-- This site is running CAOS: Complete Analytics Optimization Suite for WordPress --> <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', 'https://domain.com/wp-content/cache/caos-analytics/ga.js', 'ga') window['ga-disable-UA-1111111-1'] = false ga('create', 'UA-1111111-1', { 'cookieName': 'caosLocalGa', 'cookieDomain': 'domain.com', 'cookieExpires': '172800' } ) ga('set', 'displayFeaturesTask', null) ga('set', 'anonymizeIp', true) ga('send', 'pageview')</script>
- This reply was modified 4 years, 10 months ago by hatschiii.
Nevermind, message appears to not load in full.
Anyway, nothing seems off about both snippets. I’ll have to research further.
You’re sure it’s not blocked by your ad blocker or anything?
- This reply was modified 4 years, 10 months ago by Daan from Daan.dev.
What do you mean with “messages appears to not load in full”?
Both codes starts with <script> and end with </script>, so it’s the entire CAOS codeI used a clean browser which I normaly don’t use, cleaned cache, cookies,… and have no plugins installed. However. it works in this browser with analytics.js and not ga.js. So if one js is working the other should not be blocked by the browser.
Asum you have a test environmend for testing updates of the plugin, right? Do you see the same issue at your end?
- This reply was modified 4 years, 10 months ago by hatschiii.
- The topic ‘Host ga.js locally, not analytics.js’ is closed to new replies.