Question

The simplest HTML page does not work

  • 11 August 2020
  • 3 replies
  • 244 views

  • New Participant
  • 1 reply

I am following the “Setup Mixpanel” instructions for JavaScript:

I copied the JS snippet (with my token) just before the </head> tag of my page.

This is my HTML:

<html>
<head>
...
mixpanel.init("my token", {batch_requests: true})</script>
</head>
<body>
<script type="text/javascript">
alert("1");
mixpanel.track("Event name");
alert("2");
</script>
</body>
</html>

The alerts work, but I don’t see a request with event data in Chrome developer tools.

The “Check for Incoming Data” button produces “We haven't received any data yet” message.

What am I doing wrong?  

 


3 replies

It was due to “Do not track” setting in Chrome (I did not even know about).

This issue should be on the Setup page, in Troubleshooting section!

Userlevel 5
Badge +3

@vtwy — thanks for circling back to your question and pointing that out! I agree, that would be really helpful. I’ll share that suggestion with the product team :) 

 

For anyone stumbling on this post in the future, you may find this guide helpful: https://community.mixpanel.com/building-analysis-reports-14/what-can-affect-users-from-being-tracked-3509

Userlevel 5
Badge +3

A quick follow-up from your feedback — we just added this guide to the Community FAQs widget, which is now accessible from the help widget within the product! Now you can find Community Tips without ever needing to leave Mixpanel:

 

 

Reply


Mixpanel