-
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
Per-page analytics aren't visible in Wagtail 2.0 #23
Comments
Yes, it's definitely fragile. A new hook would be perfect. |
Hi Tom, I started on this. My progress is here: https://github.com/tomdyson/wagalytics/compare/master...candlewaster:hook?expand=1 Instead of allowing arbitrary HTML to be added to the end of the settings panel, I'm envisioning that people would use a hook to insert So, I've added an
Any chance you could help with the Python GA API? The JS code that gets the 24 hour views would be in Python now, but I'm really bewildered about how GA actually works. The code would go here. More about the hook: My code assumes there is a new hook called |
Hi @alexgleason. I agree, it's bewildering! All my code uses JavaScript, with a Python view for the initial authentication step. It looks like the Python API has changed since I wrote this. There are now some good examples at: https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-py The plain REST reference is also useful - you may prefer to use this (e.g. with the Requests library): https://developers.google.com/analytics/devguides/reporting/core/v4/basics Annoyingly, it seems you now need to provide the 'View ID' for all reporting queries. We could document this step - probably after "4. Find the ID for your Google Analytics property" - or look it up using the Management API... Re your hook: how about |
For a quick fix for Wagtail 2.0 the wagtail_hooks file needs line 65 changing from |
Looks like this:
isn't showing up.
Glancing at the code, is that part being generated by JavaScript? If so I think it's a bit fragile since updating the front-end would cause it to break. It may be worth adding an extra hook into Wagtail, maybe to override settings_panels
The text was updated successfully, but these errors were encountered: