Setting up a proxy using Vercel
Optimize tracking by proxying data via Vercel.
If you’re using Vercel, it’s quite easy to proxy the traffic through your own domain, checkout the guide below.
Setup
Vercel Configuration
First you have to add two rewrite rules to the rewrites
object in your vercel.json
file.
Configure Vemetric
Depending on your setup you need to adjust the Vemetric configuration:
HTML Script
The src
attribute of the script tag should now point to /_v_script.js
. You also need to pass the data-host
attribute with the value of /_v
NPM Package
For the NPM package you need to pass the host
option to the init
function with the value of /_v
Congratulations! You’ve successfully set up a proxy using Vercel. Please reach out if you have any questions.