Add the script to your site
Paste the script once on every page of your website, ideally inside the<head> tag so it can read the landing-page URL before the user navigates.
Where to place it
- Static HTML sites: put it in the shared layout file right before
</head>. - Single-page apps (React/Vue/Next, etc.): put it in your app’s document/layout head so it loads on all routes.
- Tag managers: create a Custom HTML tag that fires on All Pages.
What the script does
Once installed, the script:- Reads attribution from the landing URL: detects
cms_rfin the query string (example:?cms_rf=abc123). - Stores attribution as a first-party cookie: saves the value for 60 days, so conversions that happen later can still be attributed.
- Exposes a global tracking object: makes the client SDK available under
window._cmsfor debugging/verification. - Sends events with attribution attached: when your lead/sale events are fired, the stored
cms_rfis included so the conversion is credited to the original CutMeShort link click.
Configuration options
You can pass the following attributes on the script tag:data-api-host
| Type | url |
| Default | "https://www.cutmeshort.com" |
| Example | "https://api.yourdomain.com" |
data-domain
| Type | string |
| Example | "yourdomain" |
Verification
- Open your website, then open the browser console and run:
window._cms
- Visit a test landing page URL that includes
cms_rf, for example:https://your-site.com/?cms_rf=test
- Confirm a first‑party cookie is set (in your browser devtools under Application → Cookies).
- The script is present in the
<head>and not duplicated. - Your site (or CDN) is not serving a cached version of the page missing the script.



