• Resolved hatschiii

    (@hatschiii)


    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?

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Daan from Daan.dev

    (@daanvandenbergh)

    I guess I could implement that. Could you tell me what the difference is?

    Thread Starter hatschiii

    (@hatschiii)

    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.
    Plugin Author Daan from Daan.dev

    (@daanvandenbergh)

    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.

    Thread Starter hatschiii

    (@hatschiii)

    perfekt! 🙂 thanks daanvandenbergh
    looking forward into the next release!

    Thread Starter hatschiii

    (@hatschiii)

    When do you think will the new version be available?

    Plugin Author Daan from Daan.dev

    (@daanvandenbergh)

    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.

    Thread Starter hatschiii

    (@hatschiii)

    cool 🙂 thanks daan

    Plugin Author Daan from Daan.dev

    (@daanvandenbergh)

    @hatschiii,

    Just wanted to let you know that the new release contains the feature you requested! 😀

    Thread Starter hatschiii

    (@hatschiii)

    Great! Thanks so much @daanvandenbergh

    Thread Starter hatschiii

    (@hatschiii)

    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 Analytics

    Plugin Author Daan from Daan.dev

    (@daanvandenbergh)

    Have 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.

    Thread Starter hatschiii

    (@hatschiii)

    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).

    Thread Starter hatschiii

    (@hatschiii)

    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.
    Plugin Author Daan from Daan.dev

    (@daanvandenbergh)

    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?

    Thread Starter hatschiii

    (@hatschiii)

    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 code

    I 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.
Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Host ga.js locally, not analytics.js’ is closed to new replies.