Set up a proxy
Set up first-party tracking by passing Converge requests through your own domain
Overview
By proxying requests to Converge through your own domain, Converge is no longer treated as a third-party script. This has the following advantages:
- First-party cookies When Converge runs on your main domain, we automatically set a first-party cookie. First-party cookies are not restricted by browser privacy features like Apple ITP. They are longer-lasting, allowing you to track longer user journeys.
- Bypassing ad blockers Converge’s domain can be blocked by ad blockers based on our domain name. Using your own domain lets you bypass these ad blockers.
Installation Instructions
There are two parts to proxying requests to Converge:
- Hosting the script on your own domain By proxying requests to
https://static.runconverge.com/pixels/*.js
the Converge script is loaded through your domain. - Proxying the tracking requests By proxying requests to
https://app.runconverge.com/api/tr/*
the tracking requests are sent through your domain.
Ensure that the proxy sets the X-Forwarded-For
header to the original IP address of the request.
Ensure that the proxy sets the X-Forwarded-Host
header to the domain name of your proxy.
To let Converge know your proxied domain, update your Converge pixel snippet as follows:
Update the src
of the Converge script to point to your domain. Replace xxxxxx
with your Converge pixel public token.
Include the proxy
call to configure your proxied endpoints for static and tracking requests.
This should happen before any tracking calls.
This would yield the following updated snippet:
Setting up a proxy through Vercel rewrites
If your site is hosted on Vercel, you can use the vercel.json configuration file to easily set up a proxy to Converge.
Update your Converge pixel snippet to the following:
After deploying the changes, verify that
- static scripts like the Converge pixel and GTAG’s load from your own domain
- tracking requests to
/tr/*
are proxied through your domain - the response headers from the
/tr/track
call include theSet-Cookie
header which sets a__cvg_1p_uid
cookie
Was this page helpful?