Visitor and campaign tracking

Tracking and forms

Visitor and campaign tracking

This page is the reference for what SmartDingo Form Tracker captures in the browser: the full list
of tracked fields per plan, how first-touch and last-touch attribution differ, how the referrer
channel is worked out, and where the data is stored. For mapping these values into your form, see
Field mapping & auto-fill.

How tracking works

Everything is captured client-side by the tracker script (sdft-tracker.js) that loads on your
pages. On each page view it reads the URL query string, the referrer, and the browser environment,
then writes the enabled values into browser storage under an sdft_ key prefix. When a mapped form
is submitted, the stored values are filled into your form fields (and, on paid plans, sent to the
Leads page).

Only enabled fields are captured — turn fields on under SmartDingo Form Tracker → Settings →
Tracking Fields
. Fields above your plan are shown but locked.

Note Because capture happens in the browser, values only exist once the tracker has run and
(if you use a consent mode) consent has been granted. Until then, data is buffered in memory and
written once consent arrives. See GDPR & consent.

First-touch vs last-touch

Attribution decides what happens when a value is already stored and a new page view brings a new
one:

  • Last-touch — overwritten by the most recent visit. The five standard UTMs plus utm_id are
    rewritten together whenever any UTM parameter is present in the URL (parameters missing from
    the new URL are blanked). Ad click IDs and ref/affiliate_id are overwritten only when that
    specific parameter is present; otherwise the stored value is preserved.
  • First-touch — written once and never overwritten, so it preserves the visitor’s original
    entry point across their whole history. This covers the first_utm_* set, landing page, device
    type, visit timestamp, referrer URL, search term and referrer category.
  • Cumulative / at-submit — recomputed as the visitor browses (visited pages, page and visit
    counts) or calculated at the moment of submission (conversion page, session duration).

Tracked-field reference

12 fields on Free, +14 on Starter, +8 on Pro (34 total). Badges show the plan a field
requires; unbadged fields are on every plan.

FieldPlanAttributionWhat it captures
UTM Source Last-touchutm_source from the URL
UTM Medium Last-touchutm_medium from the URL
UTM Campaign Last-touchutm_campaign from the URL
UTM Term Last-touchutm_term from the URL
UTM Content Last-touchutm_content from the URL
Google Click ID (gclid) Last-touchGoogle Ads gclid
Landing Page First-touchPath of the first page of the session (home for the root)
Device Type First-touchdesktop, mobile or tablet (see limitations)
Visit Timestamp First-touchVisitor-local date/time with timezone offset, ISO-style
Referrer URL First-touchdocument.referrer (empty if none)
Search Term First-touchSearch query pulled from the referrer (see limitations)
Conversion Page At submitPath of the page where the form was submitted
UTM ID(Starter)Last-touchutm_id from the URL
Facebook Click ID (fbclid)(Starter)Last-touchMeta fbclid
Microsoft Click ID (msclkid)(Starter)Last-touchMicrosoft/Bing Ads msclkid
Google Ads Source (gad_source)(Starter)Last-touchgad_source
Google Ads iOS (gbraid)(Starter)Last-touchgbraid
Google Ads iOS (wbraid)(Starter)Last-touchwbraid
First UTM Source(Starter)First-touchOriginal utm_source
First UTM Medium(Starter)First-touchOriginal utm_medium
First UTM Campaign(Starter)First-touchOriginal utm_campaign
First UTM Term(Starter)First-touchOriginal utm_term
First UTM Content(Starter)First-touchOriginal utm_content
Referrer Category(Starter)First-touchDerived marketing channel (see below)
Visitor Type(Starter)Derivednew or returning, based on a stored visitor identifier
Visited Pages(Starter)CumulativeComma-separated list of recent page paths, capped per plan
LinkedIn Click ID (li_fat_id)(Pro)Last-touchLinkedIn li_fat_id
X/Twitter Click ID (twclid)(Pro)Last-touchX/Twitter twclid
TikTok Click ID (ttclid)(Pro)Last-touchTikTok ttclid
Referral ID (ref)(Pro)Last-touchref query parameter
Affiliate ID(Pro)Last-touchaffiliate_id query parameter
Pages Viewed Count(Pro)CumulativeTotal page views, incremented on every page
Session Duration (seconds)(Pro)At submitSeconds between session start and submission
Visit Count(Pro)CumulativeNumber of distinct visits/sessions

Note The Visited Pages list is capped at 10 (Free) / 30 (Starter) / 50 (Pro) entries;
once full, the oldest paths drop off.

How the referrer category is derived

Referrer Category (Starter) turns the raw referrer and URL into one marketing channel. It is
evaluated in this order:

  1. email — if utm_medium is email or e-mail.
  2. Paid vs organic — a “paid” signal means any of these click IDs is on the URL:
    gclid, gbraid, wbraid, msclkid, fbclid, li_fat_id, twclid, ttclid, gad_source.
  3. No referrerpaid_search if a paid signal is present, otherwise direct.
  4. Search engine referrer (Google, Bing, Yahoo, DuckDuckGo, Baidu, Yandex, Ecosia, Ask) —
    paid_search with a paid signal, otherwise organic_search.
  5. Social referrer (Facebook, Instagram, X/Twitter/t.co, LinkedIn, Pinterest, TikTok, Reddit,
    YouTube, Snapchat, Threads) — paid_social with a paid signal, otherwise organic_social.
  6. Anything elsereferral.

So the possible values are email, paid_search, organic_search, paid_social,
organic_social, referral and direct. Categorisation is based on a built-in list of well-known
domains; a niche search engine or network not on the list is reported as referral.

Device detection & search-term limitations

Be realistic about these two fields — both are best-effort.

Warning Device Type is inferred from the browser user-agent string. It is a coarse
desktop / mobile / tablet guess, not a device database: spoofed or unusual user agents, and
some tablets that identify as desktop, can be misclassified.

Warning Search Term only works when the referring URL actually contains a q= or p=
query parameter. Modern search engines (Google in particular) strip the query from the referrer
for privacy, so this field is frequently empty even for genuine organic-search visits. Treat a
populated value as a bonus, not something to rely on.

Where data is stored

The tracker uses one of two browser stores, chosen on the Settings page:

BackendPlansLifetime
sessionStorageFree (forced), or chosen on paidCleared when the tab/session ends
localStorageStarter / ProPersists across sessions until cleared

On the Free plan localStorage is locked, so tracking is forced into sessionStorage.
Starter and Pro can pick either backend.

Note Two values are the exception and always use localStorage, even when sessionStorage
is selected: the visitor identifier and the visit-count total. That is what lets
Visitor Type and Visit Count recognise a returning visitor across sessions.

If the browser blocks storage entirely — Safari Private mode, hardened privacy settings — the
tracker falls back to an in-memory store so the current page still works. That fallback holds
nothing between page loads.

What persists vs what’s lost

  • With localStorage (Starter+): first-touch attribution, visit counts and returning-visitor
    detection survive across sessions, tabs and browser restarts. This is what makes multi-visit
    attribution meaningful.
  • With sessionStorage (Free, forced): everything except the always-localStorage visitor
    identifier and visit-count total is wiped when the session ends. First-touch values effectively
    mean “first page of this session”, and a visitor returning in a new session starts fresh.
  • With the in-memory fallback: data lives only for the current page load and is gone on the next
    navigation or reload.

GDPR Stored visitor data becomes personal data once it is tied to a submitted form. Pick a
storage backend and consent mode deliberately — see
GDPR & consent.

Next steps

Stop guessing where your leads come from

You’ve spent the budget. You’ve run the campaigns. You deserve to know what actually worked. SmartDingo gives you complete, accurate, first-party attribution for every WordPress form submission. Start today on the forms you already use.

Works with your existing forms. Setup in minutes. No credit card required.

SmartDingo is a WordPress lead tracking plugin built for online marketers and WordPress developers who need accurate, cookieless attribution. It captures UTM parameters, traffic sources, landing pages, and full visitor journeys for every form submission, working seamlessly with Fluent Forms, Gravity Forms, Ninja Forms, WPForms, and other major WordPress form plugins. Whether you’re tracking leads from Google Ads, Meta, LinkedIn, or organic search, SmartDingo connects every lead to the marketing campaign that generated it.

Copyright 2026 SmartDingo