Unable to Detect Mixpanel Events Blocked by Ad-Blockers in Angular18 Project #2118
Unanswered
Arkit-Sutariya
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have integrated Mixpanel in my Angular18 project using the JavaScript SDK. When users enable an ad-blocker extension, I am not receiving any of their events. I want to detect how many users are using ad-blockers. I have tried multiple approaches to identify this issue, since the following error occurs in the user’s browser, but I have not found any solution yet.
Error: POST https://api-js.mixpanel.com/track/?verbose=1&ip=1&_=1759129490966 net::ERR_BLOCKED_BY_CLIENT
Code:
trackSignupStarted(additionalProperties: any = {}, userId?: string): void {
if (userId) {
this.identify(userId);
}
}
track(id: string, action: any = {}): void {
this.initializeMixpanel(); // Ensure Mixpanel is initialized
mixpanel.track(id, action);
}
I have already initialized Mixpanel during page load.
Beta Was this translation helpful? Give feedback.
All reactions