Serve the Oraami tracker with NGINX

Serve the public browser script from your own asset hostname. Oraami continues to receive consent configuration requests and event uploads directly.

Updated Oraami Inc

Get the configuration

Use the Node.js 22+ asset tool to download the current tracker before configuring your static origin. Run it again when updating your hosted copy.

node tracker-asset.mjs fetch ./oraami-tracker.js

Set up the asset route

  1. Copy oraami-tracker.js to /srv/oraami/oraami-tracker.js. Give the NGINX process read access. Include the downloaded location block inside the existing HTTPS server for your site or asset hostname.
  2. Run nginx -t, then reload using your service manager. Request /oraami-tracker.js and confirm a JavaScript response. The configuration serves only this local file.

Use the asset on your website

In the existing Oraami installation snippet, change only the script src to the new HTTPS asset URL. Preserve data-collector, the public site key, consent and other selected attributes. Allow your asset origin in script-src and the original collector in connect-src.

node tracker-asset.mjs verify https://YOUR_ASSET_HOST/oraami-tracker.js

Confirm the visit and keep the file current

On the registered website, check that the browser loads the script and retrieves its site configuration. Grant analytics consent, browse and check the saved batch in Capture health. If a byte comparison fails for a static origin, refresh the source file and revalidate the cached copy.

Related guides