Auto-Populate Source/Medium Documentation
Overview
The Auto-Populate Source/Medium feature automatically sets utm_source and utm_medium parameters based on the detected traffic source and organic source string. This is particularly useful for tracking organic and referral traffic without manually setting UTM parameters.
How It Works
Server-Side Tracking
When enabled, the plugin will:
Set utm_source to the value of organic_source_str cookie
Set utm_medium to the value of traffic_source cookie
Client-Side Tracking
The traffic source is determined as follows:
Paid: When fbclid, gclid, or msclkid parameters are present
Organic: Traffic from search engines (Google, Bing, Yahoo, DuckDuckGo)
Direct: When no referrer is present or internal traffic
Referral: All other external traffic sources
Configuration
Admin Settings
The feature can be enabled/disabled through the HandL UTM Grabber settings page under the "Options" tab.
Value Mapping
Traffic sources are mapped as follows:
utm_medium will be set to one of:
Paid
Organic
Direct
Referral
Other
utm_source will be set to the specific source:
Bing
Yahoo
Direct
Internal
etc.
Usage Examples
Tracking Organic Search Traffic
When a visitor comes from Google search:
utm_medium = "Organic"
utm_source = "Google"
Tracking Social Media Traffic
When a visitor comes from Facebook:
utm_source = "Facebook"
Tracking Referral Traffic
When a visitor comes from a blog that linked to your site:
utm_medium = "Referral"
utm_source = [referring domain]
Important Notes
The feature only sets UTM parameters if they're not already present
Values are stored in cookies for consistent tracking across sessions
Respects GDPR settings and cookie consent
Works with both server-side and client-side tracking
Compatible with the plugin's custom parameter feature
Troubleshooting
If UTM parameters are not being set:
Verify the feature is enabled in settings
Verify no conflicting UTM parameters are present in URLs