Closed KalobTaulien closed 4 years ago
Does this PR eliminate per-page statistics added in 584e8aeb3122e337c1a3f95944aed94492c90c30 commit? (See insert_editor_js
hook in wagtail/wagtail_hooks.py
)
It seems nobody is here :-(
@drimacus182 Looks like the hook was broken under Wagtail 2.x and removed in this PR.
There has been some discussion on #23 on how to fix under Wagtail 2.x.
Here is a Gist with a working hook:
https://gist.github.com/jacobwegner/011ddeb93c5aeeccc9277eeb6ccaea56
You'd want to copy wagtail_hooks.py
into your project (or add to an existing wagtail_hooks.py
script):
https://docs.wagtail.io/en/stable/reference/hooks.html#hooks
Added in multisite Wagtail support. Each site can be configured to hold its own GA View ID, and Key Content (or Key Filepath). If there's more than one site and the WAGALYTICS_SETTINGS are set, a site switcher will display (image below)
Multisite support requires
wagtail.contrib.settings
to be enabled (not a problem for your website, but still a noteworthy point).I've upgraded the
re_path
URLs to use Djangopath
s. And also added Django Error Messages to thedashboard
view to help guide setup.Continued support for Single Site instances is included.
Added some basic tests, using PyTest. A proper GA VIEW ID and KEY.json (or content_of_KEY.json) is required.