admin管理员组文章数量:1223181
I have created a simple react app, and I try to send some events to mixpanel.
However nothing is sent. No api requests are shown in network console, when mixpanel.track('test') is called.
when mixpanel.init('token') is called, I receive this response:
{"notifications":[],"config":{"enable_collect_everything":false}}
this is my index.js:
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
let mixpanel = require('mixpanel-browser');
mixpanel.init('my-secret-token');
mixpanel.track('test');
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
I have initialized my react app by create-react-app, and installed mixpanel-browser module.
I also have created mixpanel project, and triple checked that token.
Any ideas what I am doing wrong?
I have created a simple react app, and I try to send some events to mixpanel.
However nothing is sent. No api requests are shown in network console, when mixpanel.track('test') is called.
when mixpanel.init('token') is called, I receive this response:
{"notifications":[],"config":{"enable_collect_everything":false}}
this is my index.js:
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
let mixpanel = require('mixpanel-browser');
mixpanel.init('my-secret-token');
mixpanel.track('test');
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
I have initialized my react app by create-react-app, and installed mixpanel-browser module.
I also have created mixpanel project, and triple checked that token.
Any ideas what I am doing wrong?
Share Improve this question edited Sep 13, 2018 at 11:51 Óscar Andreu 1,70014 silver badges32 bronze badges asked Aug 22, 2018 at 9:01 user3777939user3777939 4013 silver badges13 bronze badges3 Answers
Reset to default 14Anything that stops tracking can be the cause - Adblock is one possibility.
Another one is "Do not track" setting enabled on your browser.
There may be other plugins which you might have installed to avoid websites tracking you.
Ok, it seems to have something to do with my chrome browser. When using safari, everything works fine, but with chrome nothing is sent.
macOS: high sierra, 10.13.6 (17G65) chrome version: 68.0.3440.106
Do you have any adblocker?
I had the same issue and the problem was the uBlock chrome extension. Some adblockers prevent Mixpanel from loading on your page. To avoid this, I moved all the important events to the backend.
Here you have the Mixpanel information about adblockers:
https://help.mixpanel.com/hc/en-us/articles/115004499463-Ad-Blockers-Affect-Mixpanel
本文标签: javascriptMixpanel events not sentStack Overflow
版权声明:本文标题:javascript - Mixpanel events not sent - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739393436a2161278.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论