Is there a way to do CNAME mapping to avoid adblockers? I'm aware of proxy setup, looking for much more easier option
Hi Harish S., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> ๐
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
Yes, you can use a CNAME to help avoid adblockers with Mixpanel. According to the documentation, for hosted subdomains that don't allow cross-subdomain cookies, you can use a CNAME to change from yourdomain.hostapp.com to yourdomain.com as an alternative to disabling cross-subdomain cookies.
This is mentioned specifically in the JavaScript SDK documentation:
However, while a CNAME can help in some cases, Mixpanel generally recommends setting up a proxy server as the more comprehensive solution for dealing with adblockers. The proxy approach is mentioned in multiple documents as the recommended way to reduce data loss from adblockers:
Choosing the Right Method notes that with client-side tracking, "You may lose events for 30-50% of your users. You can resolve this by sending events through a proxy, but it requires a bit more effort."
If you're looking for the easiest option, you might want to consider server-side tracking instead, which is completely immune to adblockers and provides more reliable data collection.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
โน๏ธย Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
