Marketing Attribution
Track where your leads come from and measure marketing ROI with multi-touch attribution.
Overview
Marketing attribution helps you understand:
- Which channels drive the most leads
- Which campaigns have the best conversion rates
- How to allocate marketing budget effectively
Attribution Models
First Touch
Credit goes to the first interaction:
Ad Click → Website Visit → Form Submit
↑
100% creditBest for: Understanding how prospects discover you.
Last Touch
Credit goes to the final interaction before conversion:
Ad Click → Website Visit → Form Submit
↑
100% creditBest for: Understanding what drives conversions.
Linear
Credit is split evenly across all touchpoints:
Ad Click → Website Visit → Form Submit
33% 33% 34%Best for: Valuing the entire journey equally.
Time Decay
More credit to recent interactions:
Ad Click → Website Visit → Form Submit
20% 30% 50%Best for: Emphasizing final conversion drivers.
Tracking Sources
UTM Parameters
Capture UTM parameters from landing pages:
| Parameter | Purpose | Example |
|---|---|---|
utm_source | Traffic source | google, facebook, email |
utm_medium | Marketing medium | cpc, organic, email |
utm_campaign | Campaign name | fall_2025_mba |
utm_term | Paid search keywords | online mba program |
utm_content | Ad variation | banner_v2 |
Referrer Tracking
Automatically capture:
- Referring URL
- Referring domain
- Landing page URL
Custom Sources
Define your own source identifiers:
- Vendor names
- Partner codes
- Offline campaigns
Marketing Channels
Define channels to categorize your traffic:
Default Channels
| Channel | Rule |
|---|---|
| Paid Search | utm_medium = “cpc” OR “ppc” |
| Organic Search | referrer contains google, bing, yahoo |
| Paid Social | utm_medium = “paid-social” |
| Organic Social | referrer contains facebook, linkedin, twitter |
| utm_medium = “email” | |
| Direct | No referrer, no UTM |
| Referral | Has referrer, no UTM |
Creating Custom Channels
Navigate to Channels
Go to Settings → Attribution → Channels
Add Channel
Click Add Channel
Configure Rules
- Name: Channel name (e.g., “Partner Referrals”)
- Rules: Match conditions
Set Priority
Lower numbers are evaluated first
Save
Click Save
Channel Rule Examples
Partner Referrals:
utm_source contains "partner" OR referrer contains "partner-site.com"Webinar Leads:
utm_campaign contains "webinar" OR source = "zoom-webinar"Offline Events:
source = "career-fair" OR source = "info-session"Attribution Rules
Create rules to automatically attribute leads:
Rule Structure
IF [conditions match]
THEN [set attribution fields]Example Rules
Google Ads Attribution:
IF utm_source = "google" AND utm_medium = "cpc"
THEN
- channel = "Paid Search"
- source = "Google Ads"
- campaign = {{utm_campaign}}Facebook Lead Ads:
IF source = "facebook-lead-form" OR utm_source = "facebook"
THEN
- channel = "Paid Social"
- source = "Facebook"
- campaign = {{utm_campaign}}Email Campaign:
IF utm_medium = "email"
THEN
- channel = "Email"
- campaign = {{utm_campaign}}
- email_list = {{utm_content}}Attribution Fields
Track these fields on every lead:
Standard Attribution
| Field | Description |
|---|---|
channel | Marketing channel |
source | Traffic source |
medium | Marketing medium |
campaign | Campaign name |
term | Keywords (paid search) |
content | Ad content/variation |
Extended Attribution
| Field | Description |
|---|---|
referrer_url | Full referring URL |
referrer_domain | Referring domain |
landing_page | First page visited |
gclid | Google Click ID |
fbclid | Facebook Click ID |
Multi-Touch Tracking
Track multiple interactions before conversion:
Touchpoint History
{
"touchpoints": [
{
"timestamp": "2024-12-20T10:00:00Z",
"channel": "Paid Search",
"source": "Google Ads",
"campaign": "mba-awareness"
},
{
"timestamp": "2024-12-22T14:30:00Z",
"channel": "Email",
"source": "Newsletter",
"campaign": "december-newsletter"
},
{
"timestamp": "2024-12-25T09:15:00Z",
"channel": "Direct",
"source": "Direct Visit",
"campaign": null
}
],
"first_touch": "Paid Search / Google Ads",
"last_touch": "Direct / Direct Visit",
"conversion": "2024-12-25T09:20:00Z"
}Viewing Touchpoints
- Go to Leads → Select lead
- Click Attribution tab
- View complete journey
Analytics & Reporting
Channel Performance
| Channel | Leads | Conversion Rate | Cost/Lead |
|---|---|---|---|
| Paid Search | 1,250 | 4.2% | $45 |
| Organic Search | 890 | 3.8% | $0 |
| 650 | 6.5% | $12 | |
| Paid Social | 420 | 2.1% | $62 |
Campaign Performance
| Campaign | Leads | Enrolled | ROI |
|---|---|---|---|
| Fall MBA Push | 450 | 23 | 320% |
| Nursing Awareness | 380 | 18 | 280% |
| Email Nurture | 290 | 31 | 450% |
Source Trends
Track lead volume over time by source:
- Daily/weekly/monthly views
- Year-over-year comparison
- Trend analysis
Integration with Ads
Ledly stores click IDs for offline conversion tracking, but your landing pages must capture and submit them.
Ledly does not have a JavaScript snippet for your landing pages. Your form must capture click IDs from the URL and include them in the lead submission.
Capturing Click IDs
When a user clicks an ad, platforms append click IDs to the URL:
https://yoursite.com/landing?gclid=abc123&utm_source=google
https://yoursite.com/landing?fbclid=xyz789&utm_source=facebookYour landing page must:
- Extract click IDs from the URL (JavaScript)
- Store them in hidden form fields or localStorage
- Include them when submitting leads to Ledly
Example JavaScript:
// Extract click IDs from URL
const params = new URLSearchParams(window.location.search);
const clickIds = {
gclid: params.get('gclid'), // Google Ads
fbclid: params.get('fbclid'), // Facebook/Meta
msclkid: params.get('msclkid'), // Microsoft Ads
ttclid: params.get('ttclid'), // TikTok
li_fat_id: params.get('li_fat_id') // LinkedIn
};
// Include in your lead submission
fetch('https://api.ledly.io/api/leads/inbound', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: formData.email,
first_name: formData.firstName,
// Include captured click IDs
gclid: clickIds.gclid,
fbclid: clickIds.fbclid,
utm_source: params.get('utm_source'),
utm_medium: params.get('utm_medium'),
utm_campaign: params.get('utm_campaign')
})
});Supported Click IDs
| Field | Platform | URL Parameter |
|---|---|---|
gclid | Google Ads | ?gclid=xxx |
fbclid | Facebook/Meta | ?fbclid=xxx |
msclkid | Microsoft Ads | ?msclkid=xxx |
ttclid | TikTok | ?ttclid=xxx |
li_fat_id | ?li_fat_id=xxx | |
click_id | Generic/Custom | ?click_id=xxx |
Google Ads Setup
- Enable auto-tagging in Google Ads (adds
gclidto URLs automatically) - Capture
gclidon your landing page - Submit it with leads to Ledly
- Export qualified leads with click IDs for offline conversion upload
Facebook Ads Setup
- Facebook automatically appends
fbclidto URLs - Capture
fbclidon your landing page - Submit it with leads to Ledly
- Use for offline conversion matching
Offline Conversions
Once leads are qualified/converted, export them with click IDs:
- Go to Leads → Export
- Include
gclidorfbclidfields - Upload to Google Ads or Facebook Ads Manager
- Platforms match conversions to original ad clicks
- Optimize campaigns based on actual conversion data
API Reference
Get Attribution Rules
GET /api/attributionCreate Attribution Rule
POST /api/attribution
{
"name": "Google Ads",
"priority": 10,
"conditions": {
"operator": "AND",
"rules": [
{ "field": "utm_source", "operator": "equals", "value": "google" },
{ "field": "utm_medium", "operator": "equals", "value": "cpc" }
]
},
"actions": [
{ "field": "channel", "value": "Paid Search" },
{ "field": "source", "value": "Google Ads" }
]
}Get Channels
GET /api/attribution/channelsCreate Channel
POST /api/attribution/channels
{
"name": "Partner Referrals",
"rules": {
"operator": "OR",
"rules": [
{ "field": "utm_source", "operator": "contains", "value": "partner" }
]
}
}Best Practices
-
Capture UTMs consistently - Use a naming convention for all campaigns
-
Don’t over-complicate - Start with basic channel tracking
-
Review channel definitions - Ensure they don’t overlap
-
Match to business goals - Track what matters to your organization
-
Combine with CRM data - Track through to enrollment for true ROI
-
Audit regularly - Check for miscategorized leads