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)

  1. Sign in at analytics.google.com and select the correct property
  2. Click Admin → Access Management (property level is fine)
  3. Click + → Add users
  4. Enter: analytics-service-account@mindful-agency-443921-d5.iam.gserviceaccount.com
  5. Role: ViewerSave

✅ 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

In GA4 → Admin → Data display → Events → Create event:

  1. Event name: exactly cm_tracking
  2. Mark as key event: ON
  3. Default key event value: don't set one
  4. Counting method: Once per event
  5. Choose how to create an event: Create with code ← important
  6. 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_tracking rule 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 nameScopeUser property / Event parameter
CM Tracking IDUserexperiment_id
CM Event TypeEventevent_type
CM Event Tracking IDEventexperiment_id
CM Experiment ModeEventexperiment_mode
CM Experiment VariantEventexperiment_variant
CM Outcome IDEventoutcome_id
CM Outcome IndexEventoutcome_index
CM Outcome TypeEventoutcome_type
CM Page PathEventpage_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:

PlatformWhere
ShopifyOnline Store → Themes → Edit code → theme.liquid, just before </head>
WordPressA header-injection plugin (e.g. WPCode) → Header field
Magento / Adobe CommerceContent → Design → Configuration → HTML Head
Next.js / ReactShared layout, <Script strategy="beforeInteractive">
Any CMS with a "header scripts" fieldPaste 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)

  1. 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)
  2. 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

Need a hand? [email protected] or the in-app chat.


Did this page help you?