angulartics / angulartics-mixpanel

Mixpanel plugin for Angulartics
MIT License
34 stars 27 forks source link

How to make MixPanel Javascript API calls? #26

Open otravers opened 7 years ago

otravers commented 7 years ago

I'm probably dense, but I didn't see in the doc/example whether I can use mixpanel javascript functions with Angulartics, i.e. can I use something like the following just as if I was using MixPanel directly:

<script type="text/javascript">mixpanel.identify("smrdmstrg"); mixpanel.people.set_once({ "$created": new Date(), "$first_name": "Olivier" });</script>

timelf123 commented 7 years ago

Yep, you can call mixpanel directly after it has been loaded on the page. Angulartics-mixpanel is just a wrapper around the core functions.

otravers commented 7 years ago

Related to my initial question, it's not clear to me how you're supposed to create and capture your own Mixpanel (event or people) properties via Angulartics. Is it possible via declarative tracking, or do you need to use the Angulartics API? Examples would be great, because the Angulartics-Mixpanel example only covers the basics.