-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wagalytics Multisite Support #39
Wagalytics Multisite Support #39
Conversation
Does this PR eliminate per-page statistics added in 584e8ae commit? (See |
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 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.