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:

1

Update the src of the Converge script to point to your domain. Replace xxxxxx with your Converge pixel public token.

<script src="https://yourdomain.com/cvg/static/pixels/xxxxxx.js" async></script>
2

Include the proxy call to configure your proxied endpoints for static and tracking requests.

cvg({method: "proxy", tracking: "https://yourdomain.com/cvg", static: "https://yourdomain.com/cvg/static"});

This should happen before any tracking calls.

This would yield the following updated snippet:

<script src="https://yourdomain.com/cvg/static/pixels/xxxxxx.js" async></script>
<script>
window.cvg||(cvg=function(){cvg.process?cvg.process.apply(cvg,arguments):cvg.queue.push(arguments)},cvg.queue=[]);
cvg({method: "proxy", tracking: "https://yourdomain.com/cvg", static: "https://yourdomain.com/cvg/static"});
cvg({method:"track",eventName:"$page_load"});
</script>

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.

{
  "rewrites": [
    {
      "source": "/cvg/static/:path*",
      "destination": "https://static.runconverge.com/:path*"
    },
    {
      "source": "/cvg/:path*",
      "destination": "https://app.runconverge.com/api/tr/:path*"
    }
  ]
}

Update your Converge pixel snippet to the following:

<script src="/cvg/xxxxxx.js" async></script>
<script>
window.cvg||(cvg=function(){cvg.process?cvg.process.apply(cvg,arguments):cvg.queue.push(arguments)},cvg.queue=[]);
cvg({method: "proxy", tracking: "https://yourdomain.com/cvg", static: "https://yourdomain.com/cvg/static"});
cvg({method:"track",eventName:"$page_load"});
</script>

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 the Set-Cookie header which sets a __cvg_1p_uid cookie