Code Monkey home page Code Monkey logo

Comments (9)

phy25 avatar phy25 commented on June 17, 2024 1

@tatewake I can make a PR for this. Looks like Firefox's strict private mode is blocking ga.js from loading, and the JavaScript code I mentioned above doesn't handle that so good (There's no ga() and thus hitCallback never gets executed).

from dokuwiki-plugin-googleanalytics.

phy25 avatar phy25 commented on June 17, 2024

Hello, I tried on my local wiki site and it works. Could you please post your config (a demo site would be better), and check other plugins as well?

from dokuwiki-plugin-googleanalytics.

gerardorourke avatar gerardorourke commented on June 17, 2024

I disabled every single plugin except for Google Analytics and it didn't fix it.
I changed the template from bootstrap 3 to standard dokuwiki template and it didn't fix the issue.

GA-dokuconfig

from dokuwiki-plugin-googleanalytics.

phy25 avatar phy25 commented on June 17, 2024

It works well on my end with DokuWiki Release 2018-04-22a "Greebo", plugin version "2017-02-07".

You may want to open Web Developer on your browser to see if there's any error when clicking. Also a demo site would be better.

from dokuwiki-plugin-googleanalytics.

gerardorourke avatar gerardorourke commented on June 17, 2024

Thanks Phy25.

I looked at the browser logs. In firefox this was not working because Strict content blocking was enabled (Options -> Privacy & Security -> Content Blocking -> Strict).
It is warned that this can break some sites - but this is the first time it has impacted me, by breaking a website functionality.

In Chrome it was not working as I had Ghostery chrome plugin. I hadn't tried IE! (which worked OK!).
If Ghostery is disabled / removed or if firefox is set to standard (Only blocks known trackers in Private Windows.) The Links do work.

However there is still an issue on both Chrome & Firefox.

When Google Analytics Dokuwiki Plugin is enabled, the links work, but if you try to use (on windows) CTRL + click link, it should open the link in a new tab.
But it opens in the same tab. Not as big an issue - but still an issue.

Also if you do set Strict content blocking on Firefox (or use Ghostery) instead of breaking the website functionality, ideally it should still work (but google analytics would just get blocked).

At least we know how to reproduce the issue now.

Gerry

from dokuwiki-plugin-googleanalytics.

phy25 avatar phy25 commented on June 17, 2024

I see. Looks like it's related to track_links, and it's not that robust here:

jQuery('a.urlextern, a.interwiki').click(function (e) {
e.preventDefault();
var url = this.href;
ga('send', 'event', 'outbound', 'click', url, {
'transport': 'beacon',
'hitCallback': function () {
document.location = url;
}
});
});

A quick workaround is to disable track_links (and it will never track links).

from dokuwiki-plugin-googleanalytics.

gerardorourke avatar gerardorourke commented on June 17, 2024

Phy25,

Thanks. I can confirm disabling 'Track outgoing links' restores functionality even with Firefox set to strict content blocking.

Gerry

from dokuwiki-plugin-googleanalytics.

tatewake avatar tatewake commented on June 17, 2024

Hi guys, I've been following this, sorry I haven't spoken up so far… @phy25 what's your thought… is this something that we could potentially address within the plugin (I'm guessing a fix in the JavaScript within that jQuery click handler), or is this something that's a bigger issue within DokuWiki as a whole?

from dokuwiki-plugin-googleanalytics.

tatewake avatar tatewake commented on June 17, 2024

Sounds good @phy25 ; take your time of course. We're probably due for a refresh release anyway. Thanks for your help as always.

from dokuwiki-plugin-googleanalytics.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.