Quick Start
The whole setup in four short steps: grant access, configure GA4, paste one snippet, see one event.
ClickMint setup is four steps. Most teams finish in under 15 minutes, and no developer is required on most platforms — if you can edit your site's theme or settings, you can do this.
Before you start, have:
- Admin access to your GA4 property
- The ability to edit your site's
<head>(theme editor, CMS setting, or a teammate who can) - Your ClickMint org token — from ClickMint support or your team representative
Step 1 — Give ClickMint access to GA4 (2 min)
- Sign in at analytics.google.com and select the correct property
- Click Admin → Access Management (property level is fine)
- Click + → Add users
- Enter:
analytics-service-account@mindful-agency-443921-d5.iam.gserviceaccount.com - Role: Viewer → Save
✅ Done when the service account appears in the property's user list. (Viewer is all ClickMint needs — it reads reporting data; your property stays fully yours. Access can be revoked any time from the same screen.)
Step 2 — Configure GA4 (5 min)
2a. Register the cm_tracking key event
cm_tracking key eventIn GA4 → Admin → Data display → Events → Create event:
- Event name: exactly
cm_tracking - Mark as key event: ON
- Default key event value: don't set one
- Counting method: Once per event
- Choose how to create an event: Create with code ← important
- Create
🚫 Pick "Create with code," never "Create without code." The "without code" option builds a matching rule that doubles every ClickMint event in your data. If a
cm_trackingrule with a matching condition already exists (older guides suggested one), delete it first.
2b. Add the custom dimensions
In GA4 → Admin → Data display → Custom definitions → Create custom dimension, create these nine — copy the names exactly:
| Dimension name | Scope | User property / Event parameter |
|---|---|---|
| CM Tracking ID | User | experiment_id |
| CM Event Type | Event | event_type |
| CM Event Tracking ID | Event | experiment_id |
| CM Experiment Mode | Event | experiment_mode |
| CM Experiment Variant | Event | experiment_variant |
| CM Outcome ID | Event | outcome_id |
| CM Outcome Index | Event | outcome_index |
| CM Outcome Type | Event | outcome_type |
| CM Page Path | Event | page_path |
GA4 takes 24–48 hours to start populating new dimensions in reports and in your ClickMint dashboard. Events show up in DebugView immediately.
Step 3 — Paste the ClickMint snippet (5 min)
One snippet, pasted once, in your site-wide page <head> — after your existing analytics/GTM code. Replace YOUR_ORG_TOKEN with your token:
<!-- ClickMint experiment script -->
<script>
;(function () {
var currentPath = location.pathname
var previewStorageKey = 'cm_preview_' + currentPath
var referrerStorageKey = 'cm_referrer_' + currentPath
var params = new URLSearchParams(location.search)
var previewParam = params.get('cm_preview')
var referrerParam = params.get('cm_referrer')
if (previewParam) {
localStorage.setItem(previewStorageKey, previewParam)
}
if (referrerParam) {
localStorage.setItem(referrerStorageKey, referrerParam)
}
var baseUrl = 'https://experiments.api.clickmint.com/YOUR_ORG_TOKEN' + currentPath
var queryParts = []
var storedPreview = localStorage.getItem(previewStorageKey)
if (storedPreview) {
queryParts.push('cm_preview=' + encodeURIComponent(storedPreview))
}
var storedReferrer = localStorage.getItem(referrerStorageKey)
if (storedReferrer) {
queryParts.push('cm_referrer=' + encodeURIComponent(storedReferrer))
}
var scriptUrl = baseUrl + (queryParts.length > 0 ? '?' + queryParts.join('&') : '')
var script = document.createElement('script')
script.async = true
script.src = scriptUrl
;(document.head || document.documentElement).appendChild(script)
})()
</script>Where to paste it:
| Platform | Where |
|---|---|
| Shopify | Online Store → Themes → Edit code → theme.liquid, just before </head> |
| WordPress | A header-injection plugin (e.g. WPCode) → Header field |
| Magento / Adobe Commerce | Content → Design → Configuration → HTML Head |
| Next.js / React | Shared layout, <Script strategy="beforeInteractive"> |
| Any CMS with a "header scripts" field | Paste it there (it must land in <head>, not the footer) |
Code examples and step-by-step clicks for each platform: Platform Install Guides.
Using Google Tag Manager? Nothing extra to do — paste the snippet in
<head>like everyone else, and do not add any ClickMint tags inside GTM. (Details for your container owner: GTM Installation Guide.)
Step 4 — Check it worked (2 min)
- Open GA4 → Admin → DebugView, then visit a page of your site with debug mode on (e.g. the Google Tag Assistant or the GA Debugger extension)
- Load the page once and watch the stream
You're looking for exactly one cm_tracking event per page load.
- One → you're done 🎉 Create your first experiment in the ClickMint dashboard.
- Zero or two → hand your developer the Technical Reference — its troubleshooting section pins down every cause in a few minutes.
Questions your team may ask
- "Is this collecting customer data?" → No PII, ever. The one-page answer for legal: Data Privacy & Consent
- "What exactly does it send?" → Technical Reference
Need a hand? [email protected] or the in-app chat.
Updated 21 days ago
