d3creative / statamic-tracer
Tracer by D3 Creative - A Statamic UTM Builder fieldtype that generates UTM-tagged URLs for entries: social, newsletter, and paid ads.
Package info
github.com/d3creativeuk/statamic-tracer
Language:Vue
Type:statamic-addon
pkg:composer/d3creative/statamic-tracer
Requires
- php: ^8.2
- statamic/cms: ^6.0
README
A UTM Builder fieldtype that generates UTM-tagged share URLs for Statamic entries, directly from the Control Panel.
Tracer adds a UTM Builder fieldtype to any blueprint that turns entry edit screens into a campaign URL builder. Think of it as Google's Campaign URL Builder baked into Statamic, so editors can grab a ready-tagged link without leaving the entry they're publishing.
Three sections in one field:
- Social — one Copy button per platform (X, LinkedIn, BlueSky, Threads by default; configurable).
- Newsletter —
utm_source=newsletter&utm_medium=emailwith editableutm_campaignand optionalutm_id. - Paid Ads — free-form
utm_source/utm_mediumplusutm_campaign/utm_term/utm_id.
All three share a single utm_content value (defaults to the entry slug; can be overridden per-entry). Inputs auto-normalize to lowercase with underscores so your analytics stays consistent.
Installation
composer require d3creative/statamic-tracer
Then add a Tracer (UTM Builder) field to any blueprint via the Statamic CP. The field renders on the entry edit screen for any entry whose collection produces a public URL.
Configuration
Per-field config in the blueprint editor:
- Toggle each section (Social / Newsletter / Paid Ads) on or off independently.
- Edit the Social platforms list (label +
utm_sourceper platform). - Override the default
utm_mediumvalues for Social and Newsletter.
How values persist
The field stores a nested object on the entry:
{
"content": "european_accessibility_act_compliance_websites",
"newsletter": { "campaign": "may_offer", "id": null },
"paid": { "source": "google", "medium": "cpc", "campaign": null, "term": null, "id": null }
}
When every input is empty the field stores null, so blueprints without active campaign data stay clean.
Requirements
- PHP 8.2+
- Statamic 6.x
Support
This addon is maintained by D3 Creative. For enquiries about managed Statamic maintenance, visit d3creative.uk/services/statamic-maintenance.
License
Released under the MIT License.
