mirror of
https://github.com/jazzband/django-analytical.git
synced 2026-05-01 12:14:49 +00:00
Add documentation section on Mixpanel events
Also add Performable "thank you" note.
This commit is contained in:
parent
f176792f09
commit
6fe4c0b17c
2 changed files with 27 additions and 0 deletions
|
|
@ -107,3 +107,24 @@ a context processor that you add to the
|
|||
Just remember that if you set the same context variable in the
|
||||
:class:`~django.template.context.RequestContext` constructor and in a
|
||||
context processor, the latter clobbers the former.
|
||||
|
||||
|
||||
.. mixpanel-events:
|
||||
|
||||
Tracking events
|
||||
===============
|
||||
|
||||
The django-analytical app integrates the Mixpanel Javascript API in
|
||||
templates. To tracking events in views or other parts of Django, use
|
||||
Wes Winham's `django-celery`_ package.
|
||||
|
||||
If you want to track an event in Javascript, use the asynchronous
|
||||
notation, as described in the section titled
|
||||
`"Asynchronous Tracking with Javascript"`_ in the Mixpanel
|
||||
documentation. For example::
|
||||
|
||||
mpq.push(["track", "play-game", {"level": "12", "weapon": "sword", "character": "knight"}]);
|
||||
|
||||
.. _django-celery: http://github.com/winhamwr/mixpanel-celery
|
||||
.. _`"Asynchronous Tracking with Javascript"`: http://mixpanel.com/api/docs/guides/integration/js#async
|
||||
|
||||
|
|
|
|||
|
|
@ -131,3 +131,9 @@ will look like this::
|
|||
(If you are placing the hostname and page id values in the template, do
|
||||
not forget to enclose them in quotes or they will be considered context
|
||||
variable names.)
|
||||
|
||||
|
||||
----
|
||||
|
||||
Thanks go to Performable for their support with the development of this
|
||||
application.
|
||||
|
|
|
|||
Loading…
Reference in a new issue