I followed this tutorial
https://developer.mixpanel.com/docs/javascript
But I didn’t get any data.
You can see I added Mixpanel in my header. The source code is at here
https://github.com/Hongbo-Miao/hongbomiao.com/blob/master/public/index.html#L12-L17
Mixpanel tracking code does not work
There could be a couple of things that can cause no data to be sent to your project. I had some trouble when I first started implementing Mixpanel (definitely a learning curve). This article was really helpful for me to troubleshot my implementation when I was not getting data in it https://community.mixpanel.com/questions/2560/no-data-in-project-articles-from-the-archive.html
Hope this helps!
Thanks, Frank.
However, when I tried
mixpanel.init("my_token", {debug:true});
it returned undefined.
Also, the Mixpanel Debugger didn't detect anything.
hmmm....I went on your Github and cannot find where you are implementing your mixpanel.track() calls. Can you share what file you are doing this on? I might be able to take a closer look from there 🙂
Hi Frank, sorry, I removed since I cannot make it work. But the history PR shows it. The code is just like this https://github.com/Hongbo-Miao/hongbomiao.com/pull/59/files
To very quickly capture your first event, you can add this call at the end of your index.html file - right before your closing </body> tag
<script> mixpanel.track("THE NAME OF YOUR EVENT HERE");</script>
This should capture your first event along with the default properties that come with client-side libraries.
I see that you have some javascript files(jsx) where you could do more concentrated event capturing (like create functionality to capture event properties and even people profiles). I think it would be helpful to see their Implementation course to get more information on setting up more tracking in your website. Hopefully this helps get your website tracking running!
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.