mstefaniuk / graphviz.it

Graphviz fiddling website
http://graphviz.it
GNU Lesser General Public License v3.0
111 stars 12 forks source link

App does not work when adblock enabled. #8

Closed Potherca closed 8 years ago

Potherca commented 8 years ago

When trying to use the app, nothing happens. On further inspection, the following error is present in the console:

analytics.js:2 Uncaught TypeError: Cannot set property 'l' of undefined

This is caused by an ad-blocker/privacy plugin that stops the Google Analytics JS from loading.

To prevent this error from breaking the application a check that ga actually exists should be added.

mstefaniuk commented 8 years ago

@potherca It's a little bit strange. For webpage bootstrap require.js is used with special fallback for Google analytics:

    ga: [
      '//www.google-analytics.com/analytics',
      'gamock'
    ]

so gamock.js should be loaded instead of original analytics. It is an empty function and as far I've tested it works correctly when original URL is wrong (in Firefox).

Could you provide more details about the privacy plugin you used? And maybe names and versions of used browsers?

Potherca commented 8 years ago

The details, as requested, my apologies for not including these in the first place :smile:

Browser: Google Chrome, Version 47.0.2526.106 (64-bit) Plugin: Ghostery

When Ghostery is disabled/paused all works as expected. The workaround for me was to "alway allow Google Analytics on graphviz.it"

screen shot 2015-12-27 at 22 21 43
Potherca commented 8 years ago

I can confirm the fix in 121f7c8267f6a959c03ddd1521c44f4525bfa856 works when Ghostery is enabled. Thank you very much! :smiley::+1: