Open serenamm opened 2 years ago
I think you're mixing up the generic setup for Analytical and the specific setup for Mixpanel.
Try to remove the {% mixpanel %}
from your code. It should only be necessary if you don't (want to) use the generic setup.
Also, take a look at the generated code in your web browser. You should be able to see the JavaScript code snippet included in the HTML once.
Let us know if that works or if there is actually some issue with the integration!
hI @bittner , thanks for your reply. You're right, I was mixing up the generic setupand the specific setup for Mixpanel. I removed the {% mixpanel %}
tag and I do now see the JS code snippet show up when I view the source code on my browser.
I know this seems like an extremely simple question so thank you for helping me -- I don't see any events showing up in my Mixpanel dashboard. Should I be making any other code changes to enable tracking? Does django-analytical
automatically track all clicks on the website? (I suspect the answer is "no", but I'm asking this as an example).
I can't answer this question for sure. Usually, our documentation walks you through the complete setup steps, at least on the Django side.
Note that Analytical is really just a template tag library that injects a JavaScript code snippet into your Django templates. All the rest depends on the provider of the analytics service.
It could be that Mixpanel have changed their setup, and that the one that was contributed to Analytical is legacy. But really that's just guessing on my side, based on the fact that I can't find the code snippet we have in their documentation.
If you find out more please post your findings here for everyone to benefit. Thanks!
I know this seems like an extremely simple question so thank you for helping me -- I don't see any events showing up in my Mixpanel dashboard. Should I be making any other code changes to enable tracking? Does django-analytical automatically track all clicks on the website? (I suspect the answer is "no", but I'm asking this as an example).
I can answer that. Because it's not obvious what events are "interesting", django-analytical will not send any events itself. There is some hints about sending events yourself in the documentation, and a very old issue (#10) on doing something generic.
Hi!
Thanks so much for creating this repo. I'm having trouble doing basic mixpanel tracking.
I've set up my template html file to look like this:
and my
settings.py
file looks like:I also added my
MIXPANEL_API_TOKEN
tosettings.py
as well, and I havedjango-analytical==3.1.0
in myrequirements.txt
file.I deployed these changes to a test website, so it's in prod, not dev.
I think I must be missing something -- should I be making any other code changes to enable tracking?
Thanks!