FeaturesMarketing Attribution

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% credit

Best for: Understanding how prospects discover you.

Last Touch

Credit goes to the final interaction before conversion:

Ad Click → Website Visit → Form Submit

                         100% credit

Best 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:

ParameterPurposeExample
utm_sourceTraffic sourcegoogle, facebook, email
utm_mediumMarketing mediumcpc, organic, email
utm_campaignCampaign namefall_2025_mba
utm_termPaid search keywordsonline mba program
utm_contentAd variationbanner_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

ChannelRule
Paid Searchutm_medium = “cpc” OR “ppc”
Organic Searchreferrer contains google, bing, yahoo
Paid Socialutm_medium = “paid-social”
Organic Socialreferrer contains facebook, linkedin, twitter
Emailutm_medium = “email”
DirectNo referrer, no UTM
ReferralHas referrer, no UTM

Creating Custom Channels

Go to SettingsAttributionChannels

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

FieldDescription
channelMarketing channel
sourceTraffic source
mediumMarketing medium
campaignCampaign name
termKeywords (paid search)
contentAd content/variation

Extended Attribution

FieldDescription
referrer_urlFull referring URL
referrer_domainReferring domain
landing_pageFirst page visited
gclidGoogle Click ID
fbclidFacebook 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

  1. Go to Leads → Select lead
  2. Click Attribution tab
  3. View complete journey

Analytics & Reporting

Channel Performance

ChannelLeadsConversion RateCost/Lead
Paid Search1,2504.2%$45
Organic Search8903.8%$0
Email6506.5%$12
Paid Social4202.1%$62

Campaign Performance

CampaignLeadsEnrolledROI
Fall MBA Push45023320%
Nursing Awareness38018280%
Email Nurture29031450%

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=facebook

Your landing page must:

  1. Extract click IDs from the URL (JavaScript)
  2. Store them in hidden form fields or localStorage
  3. 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

FieldPlatformURL Parameter
gclidGoogle Ads?gclid=xxx
fbclidFacebook/Meta?fbclid=xxx
msclkidMicrosoft Ads?msclkid=xxx
ttclidTikTok?ttclid=xxx
li_fat_idLinkedIn?li_fat_id=xxx
click_idGeneric/Custom?click_id=xxx
  1. Enable auto-tagging in Google Ads (adds gclid to URLs automatically)
  2. Capture gclid on your landing page
  3. Submit it with leads to Ledly
  4. Export qualified leads with click IDs for offline conversion upload

Facebook Ads Setup

  1. Facebook automatically appends fbclid to URLs
  2. Capture fbclid on your landing page
  3. Submit it with leads to Ledly
  4. Use for offline conversion matching

Offline Conversions

Once leads are qualified/converted, export them with click IDs:

  1. Go to LeadsExport
  2. Include gclid or fbclid fields
  3. Upload to Google Ads or Facebook Ads Manager
  4. Platforms match conversions to original ad clicks
  5. Optimize campaigns based on actual conversion data

API Reference

Get Attribution Rules

GET /api/attribution

Create 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/channels

Create Channel

POST /api/attribution/channels
 
{
  "name": "Partner Referrals",
  "rules": {
    "operator": "OR",
    "rules": [
      { "field": "utm_source", "operator": "contains", "value": "partner" }
    ]
  }
}

Best Practices

  1. Capture UTMs consistently - Use a naming convention for all campaigns

  2. Don’t over-complicate - Start with basic channel tracking

  3. Review channel definitions - Ensure they don’t overlap

  4. Match to business goals - Track what matters to your organization

  5. Combine with CRM data - Track through to enrollment for true ROI

  6. Audit regularly - Check for miscategorized leads