Proxy Datasense with Vercel
Serve the Datasense script from your own domain with Vercel, so ad blockers don't block it.
Add this to vercel.json. Replace /_ds with a path of your own.
vercel.json
{
"rewrites": [
{ "source": "/_ds/js/script.cookies.js", "destination": "https://usedatasense.com/js/script.cookies.js" },
{ "source": "/_ds/api/e", "destination": "https://usedatasense.com/api/e" },
{ "source": "/_ds/api/p", "destination": "https://usedatasense.com/api/p" },
{ "source": "/_ds/js/recorder.js", "destination": "https://usedatasense.com/js/recorder.js" },
{ "source": "/_ds/api/replay", "destination": "https://usedatasense.com/api/replay" }
]
}Then load the script from your own domain:
html
<script
defer
data-website-id="YOUR_SITE_ID"
src="/_ds/js/script.cookies.js"
></script>Verify
Open your site with an ad blocker on. In the browser's network tab, /_ds/js/script.cookies.js and /_ds/api/e load from your own domain, and the visit shows up on the Realtime page.