01 How to track UTM leads in your CRM
How to track UTM leads in CRM — map every ad click and landing page to a lead record, then measure which channels produce revenue — without spreadsheets or manual tagging.
Business goal
Know which marketing channels create qualified leads and closed deals
DevPremier CRM stores UTM parameters on every captured lead and rolls them up into attribution dashboards and lead source reports.
- 1
Map UTM sources to lead sources
Under Leads → Lead Sources, set UTM Source Map for each channel (e.g.
google,facebook). - 2
Add attribution fields to your capture form
Include hidden fields for UTM Source, Medium, Campaign, Landing Page, and Referrer — or load
crm-attribution-tracker.json your site. - 3
Review attribution on each lead
Open any lead → Marketing Attribution section shows captured campaign data (read-only).
- 4
Report by channel
Use Marketing → Attribution Dashboard and Lead Source Report to compare volume and conversion by source.
02 Marketing menu overview
The sidebar Marketing group appears when a user has view-marketing-dashboard or Office access (viewany-office). Expand it to reach attribution tools and lead-capture forms.
- Attribution Dashboard —
/marketing/attribution-dashboard. Requiresview-marketing-dashboard(frommarketing_reports_moduleread). - Campaigns —
/marketing/campaigns. List requiresviewany-marketing-campaigns; create/edit/delete requiremanage-marketing-campaigns(frommarketing_campaigns_module). - Lead Source Report —
/marketing/lead-source-report. Requiresview-attribution-reports(also frommarketing_reports_moduleread). - Lead capture —
/office/web_forms. Requiresviewany-office. - Form Fields —
/office/formfield. Requiresviewany-office. - New capture form —
/office/create_form. Requirescreate-office.
Lead source maintenance lives under Leads → Lead Sources (/lead/source) and is controlled by lead_sources_module — see the Lead Sources section below.
03 Lead Sources
Open Leads → Lead Sources (/lead/source) to manage your channel taxonomy. Access is gated by lead_sources_module (gates: view-lead-sources, create-lead-sources, update-lead-sources, delete-lead-sources).
Each lead source supports:
- Name — display label shown on leads and reports.
- Color — dot color in lists and charts.
- Icon — optional Font Awesome class (e.g.
fas fa-globe). - Description — internal notes.
- Display order — sort order in dropdowns and reports.
- Active — inactive sources are hidden from new assignments.
- UTM Source Map (
utm_source_map) — lowercase key used to auto-assign this source when incoming leads or web forms include a matchingutm_sourcevalue.
Fresh installs seed common sources (Website, Google Search, Google Ads, Facebook, Facebook Ads, Instagram, LinkedIn, Referral, WhatsApp, Cold Call, Walk-in, Trade Show, Email Campaign, Partner, Other) via migration 2026_07_07_120002.
How UTM mapping works: When a lead is created (web form, import, or API) and no explicit source is set, the CRM normalizes the submitted utm_source and matches it against each active source’s utm_source_map (also checks source name). The first match wins.
Budget note: A budget column exists on lead sources for ROI calculations. Demo budgets are seeded by migration 2026_07_07_160000, but the Lead Sources UI does not yet expose budget editing — campaign budgets are editable under Marketing → Campaigns.
04 Lead marketing attribution data
Open any lead detail page to see the read-only Marketing Attribution section. It displays data captured from campaigns, UTM parameters, and web forms — you cannot edit these fields on the lead form.
- Lead source and linked campaign (or raw UTM campaign / channel drilldown fallbacks).
- UTM source, medium, campaign, term, and content.
- Channel drilldowns (legacy Attributer-compatible fields).
- Landing page (clickable link), referrer, visitor IP.
- Browser, operating system, device type.
- First visit timestamp.
Web forms can auto-include hidden attribution fields seeded by AttributerFormFieldsSeeder (Channel, drilldowns, UTM fields, Landing Page, HTTP Referrer, Current URL, First Visit Timestamp). The builder also ships a client-side attribution tracker (crm-attribution-tracker.js) to populate these on submit. See Web to Lead Forms docs for setup.
05 Attribution Dashboard
Open Marketing → Attribution Dashboard (/marketing/attribution-dashboard) for an executive view of channel performance. Requires view-marketing-dashboard.
Filters: date range (this year, quarter, month, last 30/7 days, all time), pipeline, lead source, and assigned user.
Widgets include:
- Attribution highlight cards (leads, revenue, conversion signals).
- Economics section — cost per lead, cost per customer, revenue forecast by source, best rep by source.
- Leads by source chart.
- Revenue by source chart.
- ROI summary table.
Use the Full Report button to open /marketing/lead-source-report for drill-down, exports, and paginated lead lists.
06 Lead Source Report
Open Marketing → Lead Source Report (/marketing/lead-source-report) for detailed marketing analytics. Requires view-attribution-reports.
Filters: date from/to, lead source, campaign, owner, status, country, and pipeline.
Report sections:
- Summary KPI cards (leads, won leads, revenue, spend, ROI).
- ROI table by source.
- Campaign performance breakdown.
- Leads by source and revenue by source charts.
- Paginated lead list matching filters.
Export: Download CSV or Excel from the page header (/marketing/lead-source-report/export).
Tip: Run MarketingReportDemoSeeder on demo/staging environments to populate sample attribution data for charts and ROI tables.
07 Campaigns
Open Marketing → Campaigns (/marketing/campaigns) to manage paid and organic campaigns. Viewing the list requires viewany-marketing-campaigns; creating and editing uses a slide-out drawer and requires manage-marketing-campaigns.
Campaign fields:
- Name, platform, campaign type.
- Budget (editable in the UI).
- Status — draft, active, paused, completed, or archived.
- Start and end dates.
- Description.
- UTM campaign key — lowercase token matched against incoming
utm_campaignvalues.
UTM campaign key: When a lead arrives with utm_campaign matching a campaign’s utm_campaign_key (or campaign name), the CRM sets campaign_id on the lead automatically. This links leads to campaigns for performance and ROI reporting.
Paid invoice revenue is attributed back to the lead’s source and campaign via RevenueAttributionService (see Revenue attribution on invoices).
08 Revenue attribution on invoices
When an invoice is marked paid, the CRM copies marketing attribution from the linked lead onto the invoice record.
attributed_lead_source_id— from the matched lead’slead_source_id.attributed_campaign_id— from the matched lead’scampaign_id.attribution_synced_at— timestamp of the sync.
Lead matching: RevenueAttributionService finds the most recent won lead by email — first via the invoice customer’s primary contact, then via the invoice contact directly.
These columns power revenue by source charts and ROI calculations on the Attribution Dashboard and Lead Source Report. Attribution sync runs automatically when payment is recorded in the CRM UI.
09 Home dashboard marketing widgets
The CRM Home dashboard (/home) includes marketing widgets for users with view-marketing-dashboard.
Widgets include:
- Attribution highlight cards with link to the full Attribution Dashboard.
- Economics section — cost per lead, cost per customer, revenue forecast, best rep by source.
- Leads by source and revenue by source charts.
- Campaign widgets — leads, revenue, and conversion by campaign.
Dashboard marketing metrics respect the same global filters as the Attribution Dashboard (date range, pipeline, owner, lead source) when those filters are applied on Home.
Users without view-marketing-dashboard still see standard sales KPIs but not the marketing attribution blocks.
10 How to track UTM leads in CRM
Use this checklist to ensure every paid and organic visit is attributed correctly in DevPremier CRM — a common setup goal for teams migrating from spreadsheets or basic contact forms.
- Tag ad URLs with standard UTM parameters:
utm_source,utm_medium,utm_campaign(plus optionalutm_termandutm_content). - Map each
utm_sourcevalue to a Lead Source via UTM Source Map on Leads → Lead Sources. - Embed a web-to-lead form with hidden attribution fields (or load
crm-attribution-tracker.js) so UTMs are stored on the lead record. - Optionally link
utm_campaignto a Marketing → Campaigns record using the campaign’s UTM campaign key. - Review captured data on any lead’s Marketing Attribution panel.
- Measure ROI on Marketing → Attribution Dashboard and export from Lead Source Report.
SEO tip
Publish landing pages with consistent UTM naming conventions and document them internally — matching maps in the CRM is what makes “which channel paid off?” answerable in one report.
Thanks for reading DevPremier CRM docs
Browse all guides