Skip to main content
Attribution is the backbone of WisePilot’s optimization system. It links every form submission back to the content and CTA that drove it, giving you clear visibility into what’s converting.

How Attribution Works

The Attribution ID (cr_attrib)

Every visitor gets a unique cr_attrib UUID when they arrive on your site. This ID follows them through the entire funnel:
  1. Page visit — The attribution script generates and stores cr_attrib in a cookie and localStorage
  2. CTA view — The script detects when a CTA enters the viewport (50% visible) and records a cta_view event
  3. CTA click — The script captures clicks on CTA elements and records a cta_click event
  4. Link rewrite — The script appends cr_attrib as a URL parameter on the CTA’s destination link
  5. Form submission — HighLevel captures cr_attrib from the URL or injected hidden field
  6. Webhook — HighLevel sends the form submission (including cr_attrib) back to WisePilot
  7. Join — WisePilot links the form submission to the original CTA click, content asset, and visitor session

The Attribution Script

The script (attribution-tracker.js v3.0) is bundled in the WisePilot WordPress plugin and handles:
  • Generating and persisting the cr_attrib cookie (90-day expiry)
  • Rewriting CTA links to append cr_attrib and UTM parameters (idempotent)
  • Tracking CTA views via IntersectionObserver (50% visibility threshold, fires once per element)
  • Tracking CTA clicks via event delegation (capture phase)
  • Posting events directly to the WisePilot API via navigator.sendBeacon() with fetch() fallback
  • Batching view events (1-second debounce, up to 50 per batch)
  • Flushing events on page unload (visibilitychange / pagehide)
  • Injecting cr_attrib into GHL inline forms and iframe forms
  • Firing GA4 custom events (cta_view, cta_click) if window.gtag is available

Event Delivery

Events are posted directly to POST /api/integrations/cr/events — no GTM middleman. The request is authenticated by a per-site tracking_token (auto-generated when you download the plugin).
Events are rate-limited (100 requests/min per website) and deduplicated by source_event_id.

GA4 Dual-Write

If GA4 is installed on your site (i.e., window.gtag exists), the attribution script automatically fires cta_view and cta_click as GA4 custom events. No configuration needed — if gtag is on the page, events fire. You’ll see them in GA4 DebugView and reports.

What Gets Linked

Once attribution is working, WisePilot can tell you:

The Full Funnel

The attribution funnel joins data from multiple sources:
View this funnel on the CTA Performance report.

Privacy

Attribution operates with configurable privacy modes:
  • Strict (default) — Nulls referrer and click IDs immediately after join
  • Standard — Retains data with retention caps
  • Debug — Full data retention, auto-expires after 7 days
Configure privacy mode in your website settings.