This step-by-step tutorial shows you how to track conversions (signups, purchases, downloads, etc.) on your landing pages.
What You’ll Learn
By the end of this tutorial, you’ll know how to:
- Define conversion goals
- Track form submissions
- Track button clicks
- Track custom events
- View conversion analytics
- Integrate with external platforms
- π Form submissions
- π Purchase buttons
- π₯ Download clicks
- π Click-to-call buttons
- βΆοΈ Video plays
- π PDF downloads
- π Measure success: Know if your page is working
- π° Calculate ROI: Understand value of traffic sources
- π― Optimize: Find what works and improve it
- π A/B testing: Compare variant performance
- π‘ Make decisions: Use data, not guesses
- β ShahiLandin plugin installed and activated
- β Analytics enabled (Settings β Analytics)
- β Published landing page
- β Clear conversion goal defined
- Go to ShahiLandin β Settings
- Click Analytics tab
- Check Enable Analytics Tracking
- Click Save Changes
Time Required: 10-15 minutes
Difficulty: Beginner to Intermediate
Prerequisites: Published landing page with analytics enabled
What is Conversion Tracking?
Conversion tracking measures when visitors complete desired actions on your landing page:
Why Track Conversions?
Before You Start
Prerequisites
Enable Analytics
If analytics isn’t enabled:
Method 1: Track Form Submissions (Easiest)
Step 1: Add Data Attribute to Form
Edit your landing page and find the form in HTML:
Before (regular form):
`html
`
After (with tracking):
`html
`
What changed: Added data-shahilandin-conversion="form_submit"
Step 2: Define Conversion Goal
In the landing page editor:
– Goal Name: form_submit
– Goal Description: “Email signup form submission”
– Goal Value: 10 (optional – dollar value per conversion)
Step 3: Test Conversion Tracking
Note: Conversions appear within 1-2 minutes.
Multiple Forms on Same Page
If you have multiple forms, use different goal names:
`html
`
Define each as separate goals in Analytics & Goals meta box.
Method 2: Track Button Clicks
Step 1: Add Tracking to Button
For download buttons:
`html
Download Free Guide
`
For call-to-action buttons:
`html
Step 2: Define Goal
Same as Method 1:
guide_download (must match data attribute)5 (optional)Step 3: Test
Method 3: Track Custom Events with JavaScript
For advanced tracking scenarios.
Step 1: Add JavaScript Tracking Code
In your landing page HTML, add this script:
`html
`
Step 2: Define Goals
Add goals for each custom event:
video50percentpagescrollcompletevideo_playAdvanced: Track with Additional Data
`html
`
This additional data appears in analytics reports.
Method 4: Track Third-Party Forms
Contact Form 7
Add to landing page HTML (bottom of page):
`html
`
Gravity Forms
Add to theme’s functions.php or use Code Snippets plugin:
`php
addaction(‘gformafter_submission’, function($entry, $form) {
if (issingular(‘shahilanding’)) {
?>
`
WPForms
`html
`
Viewing Conversion Data
Analytics Dashboard
What You’ll See
`
ββββββββββββββββββββββββββββββββββββ
Landing Page Performance
Views: 1,247
Unique Visitors: 1,103
Conversions: 127
Conversion Rate: 11.5%
Top Conversion Goals:
Time Period: Last 30 Days
ββββββββββββββββββββββββββββββββββββ
`
Detailed Conversion Report
Click View Detailed Report to see:
Export Data
Setting Goal Values
Assign dollar values to conversions to calculate ROI.
Example Goal Values
`
Email Signup: $10
(Average email subscriber value)
Free Trial Start: $50
(Expected conversion to paid)
eBook Download: $5
(Lead value)
Demo Request: $100
(High-intent lead)
Purchase: $99
(Actual transaction value)
`
How to Set Values
In Analytics & Goals meta box:
`
Goal Name: email_signup
Goal Value: $10
`
View ROI
With goal values set, dashboard shows:
`
Total Conversion Value: $1,270
Average Value per Visitor: $1.15
ROI: 450% (if you spent $282 on ads)
`
Integrating with External Platforms
Google Analytics 4
ShahiLandin automatically sends conversion events to GA4 if configured.
Setup:
G-XXXXXXXXXXEvents Sent to GA4:
shahilandin_conversion – All conversionsshahilandin_view – Page viewsView in GA4:
shahilandin_conversionFacebook Pixel
Setup:
123456789012345Track Custom Conversions:
`html
`
Mixpanel
Setup:
Conversions automatically sent to Mixpanel with properties.
Zapier / Webhooks
Send conversion data to any platform via webhooks.
Setup Webhook:
Slack Notificationshttps://hooks.slack.com/services/YOUR/WEBHOOK/URLConversion TrackedWebhook Payload:
`json
{
“event”: “conversion”,
“goal”: “form_submit”,
“landingpageid”: 123,
“landingpagetitle”: “Free Guide Landing Page”,
“visitor_id”: “abc123”,
“timestamp”: “2024-11-28T10:30:00Z”,
“value”: 10,
“metadata”: {
“email”: “user@example.com”,
“source”: “facebook_ads”
}
}
`
Conversion Funnel Tracking
Track multi-step processes.
Example: Multi-Step Form
`html
`
Funnel Report:
`
Form Funnel:
Drop-off Analysis:
`
UTM Parameter Tracking
Track conversion sources automatically.
URL with UTM Parameters:
`
https://yoursite.com/landing-page/?utmsource=facebook&utmmedium=cpc&utmcampaign=summersale
`
ShahiLandin Automatically Tracks:
utm_sourceutm_mediumutm_campaignutm_termutm_contentView by Source:
`
Conversions by Source:
`
Privacy and GDPR Compliance
Cookie Consent
If using cookie consent plugin:
`html
`
Disable Tracking for Specific Users
`php
// Add to functions.php
addfilter(‘shahilandindisable_tracking’, function($disable) {
// Don’t track EU visitors (example)
if (userisin_eu()) {
return true;
}
return $disable;
});
`
Anonymous Tracking
Settings β Analytics β Anonymous Tracking:
Troubleshooting
Conversions Not Tracking
Check:
data-shahilandin-conversion value exactly?Solution:
`html
`
Check browser console for tracking events.
Duplicate Conversions
Problem: Same conversion counted multiple times
Solution:
Add flag to prevent duplicate tracking:
`html
`
Wrong Conversion Count
Problem: Numbers don’t match other analytics
Causes:
Normal: 5-10% variance is typical
Best Practices
Naming Conventions
Use clear, consistent goal names:
β Good:
email_signupfreetrialstartebook_downloaddemo_requestβ Bad:
goal1convbuttonclickform (too generic)Goal Organization
Group related goals:
`
Email Conversions:
Purchase Conversions:
Engagement Conversions:
`
Testing Checklist
Before launching:
Summary
You’ve learned how to:
Start tracking conversions and optimizing your landing pages!
Related Tutorials
—
Need Help? See Analytics Tracking Issues troubleshooting guide.
Share this article
Still need help?
Our support team is ready to assist you with personalized guidance for your workspace.