Mixpanel Community Icon

CNAME Mapping Tips to Bypass Adblockers Easily

·
·

Is there a way to do CNAME mapping to avoid adblockers? I'm aware of proxy setup, looking for much more easier option

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·

    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

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    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](http://yourdomain.hostapp.com) to [yourdomain.com](http://yourdomain.com) as an alternative to disabling cross-subdomain cookies.This is mentioned specifically in the JavaScript SDK documentation: Mixpanel SDKs: JavascriptHowever, 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.