Skip to content
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

Merged
merged 8 commits into from
Jan 9, 2020
Merged

Wagalytics Multisite Support #39

merged 8 commits into from
Jan 9, 2020

Conversation

KalobTaulien
Copy link
Collaborator

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

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 Django paths. And also added Django Error Messages to the dashboard 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.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@KalobTaulien KalobTaulien merged commit e01f0bd into tomdyson:master Jan 9, 2020
@drimacus182
Copy link

Does this PR eliminate per-page statistics added in 584e8ae commit? (See insert_editor_js hook in wagtail/wagtail_hooks.py )

@drimacus182
Copy link

It seems nobody is here :-(

@jacobwegner
Copy link

jacobwegner commented Jul 16, 2020

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants