Turn your QR codes into powerful marketing tools by tracking how visitors interact with your content after scanning. Our conversion tracking script automatically measures engagement and helps you understand your QR code performance.
What is Conversion Tracking?
Conversion tracking measures when someone takes a valuable action after scanning your QR code, such as:
- Staying on your page for a certain amount of time
- Filling out a contact form
- Calling your phone number
- Downloading a file
- Watching a video
Quick Setup
Add one line of code to any page your QR codes direct to:
<script src="/js/qr-tracker.js" data-time="30"></script>
That’s it! This will track when visitors stay on your page for 30+ seconds.
Configuration Options
Customize tracking by adding data attributes to the script tag:
Attribute | Purpose | Default | Example |
---|---|---|---|
data-time |
Seconds before marking as converted | 30 | data-time="45" |
data-forms |
Track form submissions | true | data-forms="false" |
data-phone |
Track phone number clicks | true | data-phone="false" |
data-downloads |
Track file downloads | false | data-downloads="true" |
data-video |
Track video engagement (50% watched) | false | data-video="true" |
data-scroll |
Track scroll depth | false | data-scroll="true" |
data-scroll-percent |
Scroll percentage for conversion | 75 | data-scroll-percent="50" |
data-debug |
Show tracking activity in console | false | data-debug="true" |
Common Use Cases
Service Business (Lead Generation)
Perfect for contractors, consultants, and service providers:
<script src="/js/qr-tracker.js"
data-time="45"
data-forms="true"
data-phone="true"></script>
Tracks: Visitors who spend 45+ seconds, submit contact forms, or click phone numbers
Restaurant/Retail (Quick Engagement)
For businesses wanting to track immediate interest:
<script src="/js/qr-tracker.js"
data-time="15"
data-downloads="true"></script>
Tracks: Visitors who stay 15+ seconds or download menus/catalogs
Content/Blog Sites (Engagement Focus)
For educational content, articles, or resources:
<script src="/js/qr-tracker.js"
data-time="60"
data-video="true"
data-scroll="true"
data-scroll-percent="70"></script>
Tracks: Deep engagement through time, video watching, or scrolling 70% of the page
E-commerce (Sales Focus)
For online stores and product pages:
<script src="/js/qr-tracker.js"
data-time="30"
data-forms="true"
data-downloads="true"></script>
Tracks: Time on product pages, newsletter signups, and catalog downloads
Real Estate (Property Interest)
For property listings and real estate agents:
<script src="/js/qr-tracker.js"
data-time="90"
data-forms="true"
data-phone="true"
data-video="true"></script>
Tracks: Extended viewing time, contact forms, phone calls, and virtual tour videos
Step-by-Step Setup Guide
Step 1: Choose Your Tracking Goals
Decide what actions indicate a “conversion” for your business:
- Quick interest: 15-30 seconds
- Moderate engagement: 45-60 seconds
- Deep engagement: 90+ seconds
Step 2: Add the Script
Copy the script tag to the <head>
section of pages your QR codes link to:
<!DOCTYPE html>
<html>
<head>
<meta name="csrf-token" content="{{ csrf_token() }}">
<script src="/js/qr-tracker.js" data-time="30" data-forms="true"></script>
</head>
<body>
<!-- Your content here -->
</body>
</html>
Step 3: Test Your Setup
- Enable debug mode:
data-debug="true"
- Scan your QR code
- Open browser developer tools (F12)
- Watch the console for tracking messages
- Perform conversion actions (wait, fill forms, etc.)
- Remove debug mode when satisfied
Step 4: View Your Results
Check your QR code analytics dashboard to see:
- Total scans vs conversions
- Conversion rate percentages
- Which QR codes perform best
- Geographic and device breakdowns
Advanced Tracking
Manual Conversion Tracking
Track custom events with JavaScript:
<script>
// Track newsletter signup
document.getElementById('newsletter-form').addEventListener('submit', function() {
if (window.qrTracker) {
qrTracker.track('email_signup', {
form_type: 'newsletter',
source: 'qr_code'
});
}
});
// Track purchase completion
if (window.location.pathname.includes('/thank-you')) {
qrTracker.track('purchase', {
page: 'confirmation',
order_value: '150.00'
});
}
</script>
Integration with Analytics
Automatically send conversions to Google Analytics:
<script>
window.addEventListener('qrConversionTracked', function(event) {
// Send to Google Analytics
if (typeof gtag !== 'undefined') {
gtag('event', 'qr_conversion', {
'event_category': 'QR Code',
'event_label': event.detail.type,
'value': 1
});
}
});
</script>
Troubleshooting
Conversions Not Tracking
- Check the console: Enable
data-debug="true"
and look for errors - Verify QR URL: Ensure your QR codes include the session parameter
- Test manually: Visit your page directly and trigger conversion actions
- Check CSRF token: Make sure
<meta name="csrf-token">
is present
Low Conversion Rates
- Adjust time threshold: Try shorter durations (15-20 seconds)
- Add more tracking types: Enable forms, downloads, or scroll tracking
- Improve content: Make pages more engaging to keep visitors longer
- Check mobile experience: Ensure pages load quickly on mobile devices
Script Not Loading
- Verify path: Ensure
/js/qr-tracker.js
is accessible - Check permissions: Make sure the script file has proper read permissions
- Test directly: Visit
https://yourdomain.com/js/qr-tracker.js
in browser
Privacy & Compliance
The tracking script:
- ✅ Only tracks anonymous session data
- ✅ Does not collect personal information
- ✅ Respects user privacy preferences
- ✅ Can be disabled per visitor
- ✅ Complies with GDPR when properly disclosed
Recommendation: Add a privacy notice to pages with QR tracking:
“We use analytics to improve our services. No personal information is collected.”
Best Practices
1. Choose Appropriate Time Thresholds
- Landing pages: 20-30 seconds
- Product pages: 45-60 seconds
- Articles/blogs: 60-90 seconds
- Videos/demos: 90+ seconds
2. Test Different Configurations
- Start with basic time tracking
- Add form/phone tracking for lead generation
- Enable video/scroll tracking for content sites
- Monitor results and adjust thresholds
3. Monitor Performance
- Check conversion rates weekly
- Compare different QR code campaigns
- A/B test different time thresholds
- Optimize based on your best performers
4. Mobile Optimization
- Ensure fast page loading
- Use mobile-friendly forms
- Test on various devices
- Keep important content above the fold
Support
Need help setting up conversion tracking? Contact our support team with:
- Your domain name
- QR code campaign details
- Specific tracking goals
- Any error messages
We’ll help you optimize your QR code conversion tracking for maximum results!