Complete Funnel Analytics Implementation
This guide offers comprehensive tracking for conversion funnels across various business models, utilizing Sealmetrics' privacy-first analytics to monitor user progression, identify bottlenecks, and optimize conversion rates.
Universal Funnel Framework
Core Funnel Events Structure
<script> function trackFunnelStep(stepData) { (function() { var options = { account: 'YOUR_ACCOUNT_ID_HERE', event: 'microconversion', label: 'Funnel Step: ' + stepData.stepName, ignore_pageview: 1, use_session: 1, properties: { // Funnel identification funnel_name: stepData.funnelName, funnel_type: stepData.funnelType, // 'sales', 'signup', 'onboarding', 'purchase' step_name: stepData.stepName, step_number: stepData.stepNumber, step_category: stepData.stepCategory, // 'awareness', 'interest', 'consideration', 'action' // Step context step_url: stepData.stepUrl || window.location.pathname, step_completion_time: stepData.completionTime, time_on_step_seconds: stepData.timeOnStep, // User journey total_funnel_time: stepData.totalFunnelTime, previous_step: stepData.previousStep, steps_completed: stepData.stepsCompleted, total_steps: stepData.totalSteps, completion_percentage: (stepData.stepsCompleted / stepData.totalSteps) * 100, // User context user_type: stepData.userType, // 'new', 'returning', 'existing_customer' traffic_source: stepData.trafficSource, campaign: stepData.campaign, device_type: stepData.deviceType, // Interaction data form_fields_completed: stepData.formFieldsCompleted, errors_encountered: stepData.errorsEncountered, help_accessed: stepData.helpAccessed, // A/B testing variant: stepData.variant, experiment_name: stepData.experimentName, // Business context estimated_value: stepData.estimatedValue, lead_score: stepData.leadScore, conversion_probability: stepData.conversionProbability } }; var url="//app.sealmetrics.com/tag/v2/tracker";function loadScript(callback){var script=document.createElement("script");script.src=url;script.async=true;script.onload=function(){if(typeof callback==="function"){callback();}};script.onerror=function(){console.error("Error loading script: "+url);};document.getElementsByTagName("head")[0].appendChild(script);}loadScript(function(){options.id=Math.floor((Math.random()*999)+1);if(window.sm){var instance=new window.sm(options);instance.track(options.event);}else{console.error("sm2 plugin is not available");}}); })(); } </script>
E-commerce Conversion Funnel
Product Discovery → Purchase Funnel
<script> // Step 1: Product Discovery function trackProductDiscovery(discoveryData) { trackFunnelStep({ funnelName: 'ecommerce_purchase', funnelType: 'purchase', stepName: 'product_discovery', stepNumber: 1, stepCategory: 'awareness', totalSteps: 5, stepsCompleted: 1, // Discovery specific discoveryMethod: discoveryData.method, // 'search', 'category', 'recommendation', 'ad' searchQuery: discoveryData.searchQuery, categoryViewed: discoveryData.category, productsViewed: discoveryData.productsViewed, // Context userType: discoveryData.userType, trafficSource: discoveryData.trafficSource }); } // Step 2: Product View function trackProductView(productData) { trackFunnelStep({ funnelName: 'ecommerce_purchase', funnelType: 'purchase', stepName: 'product_view', stepNumber: 2, stepCategory: 'interest', totalSteps: 5, stepsCompleted: 2, // Product specific productId: productData.id, productName: productData.name, productCategory: productData.category, productPrice: productData.price, // Engagement imagesViewed: productData.imagesViewed, reviewsRead: productData.reviewsRead, timeOnProduct: productData.timeOnProduct, estimatedValue: productData.price }); } // Step 3: Add to Cart function trackAddToCart(cartData) { trackFunnelStep({ funnelName: 'ecommerce_purchase', funnelType: 'purchase', stepName: 'add_to_cart', stepNumber: 3, stepCategory: 'consideration', totalSteps: 5, stepsCompleted: 3, // Cart specific productId: cartData.productId, quantity: cartData.quantity, variantSelected: cartData.variant, // Cart context cartTotalItems: cartData.totalItems, cartTotalValue: cartData.totalValue, estimatedValue: cartData.totalValue }); } // Step 4: Checkout Started function trackCheckoutStart(checkoutData) { trackFunnelStep({ funnelName: 'ecommerce_purchase', funnelType: 'purchase', stepName: 'checkout_started', stepNumber: 4, stepCategory: 'action', totalSteps: 5, stepsCompleted: 4, // Checkout specific checkoutMethod: checkoutData.method, // 'guest', 'account', 'social' cartValue: checkoutData.cartValue, itemCount: checkoutData.itemCount, // User context hasAccount: checkoutData.hasAccount, isReturningCustomer: checkoutData.isReturningCustomer, estimatedValue: checkoutData.cartValue }); } // Step 5: Purchase Completed function trackPurchaseComplete(purchaseData) { trackFunnelStep({ funnelName: 'ecommerce_purchase', funnelType: 'purchase', stepName: 'purchase_completed', stepNumber: 5, stepCategory: 'action', totalSteps: 5, stepsCompleted: 5, // Purchase specific transactionId: purchaseData.transactionId, totalRevenue: purchaseData.totalRevenue, paymentMethod: purchaseData.paymentMethod, // Success metrics funnelCompletionTime: purchaseData.totalFunnelTime, conversionRate: 100, // This user converted estimatedValue: purchaseData.totalRevenue }); } </script>
Lead Generation Funnel
Awareness → Lead → Customer Funnel
<script> // Step 1: Content Engagement function trackContentEngagement(contentData) { trackFunnelStep({ funnelName: 'lead_generation', funnelType: 'sales', stepName: 'content_engagement', stepNumber: 1, stepCategory: 'awareness', totalSteps: 6, stepsCompleted: 1, // Content specific contentType: contentData.type, // 'blog', 'whitepaper', 'video', 'webinar' contentTitle: contentData.title, contentCategory: contentData.category, engagementDepth: contentData.engagementDepth, // 'shallow', 'medium', 'deep' // Engagement metrics timeOnContent: contentData.timeOnContent, scrollDepth: contentData.scrollDepth, socialShares: contentData.socialShares, trafficSource: contentData.trafficSource, campaign: contentData.campaign }); } // Step 2: Lead Magnet Interest function trackLeadMagnetInterest(magnetData) { trackFunnelStep({ funnelName: 'lead_generation', funnelType: 'sales', stepName: 'lead_magnet_interest', stepNumber: 2, stepCategory: 'interest', totalSteps: 6, stepsCompleted: 2, // Lead magnet specific magnetType: magnetData.type, // 'ebook', 'template', 'trial', 'demo' magnetTitle: magnetData.title, magnetValue: magnetData.perceivedValue, // Interest indicators downloadButtonClicks: magnetData.downloadClicks, formViewTime: magnetData.formViewTime, estimatedValue: magnetData.leadValue }); } // Step 3: Form Started function trackFormStart(formData) { trackFunnelStep({ funnelName: 'lead_generation', funnelType: 'sales', stepName: 'form_started', stepNumber: 3, stepCategory: 'consideration', totalSteps: 6, stepsCompleted: 3, // Form specific formType: formData.type, // 'contact', 'download', 'demo', 'trial' formName: formData.name, formFields: formData.totalFields, // Form interaction firstFieldCompleted: formData.firstFieldCompleted, formAbandonmentRisk: formData.abandonmentRisk, // 'low', 'medium', 'high' estimatedValue: formData.leadValue }); } // Step 4: Lead Captured function trackLeadCapture(leadData) { trackFunnelStep({ funnelName: 'lead_generation', funnelType: 'sales', stepName: 'lead_captured', stepNumber: 4, stepCategory: 'action', totalSteps: 6, stepsCompleted: 4, // Lead specific leadType: leadData.type, // 'marketing_qualified', 'sales_qualified', 'product_qualified' leadSource: leadData.source, leadScore: leadData.score, // Lead quality companySize: leadData.companySize, industry: leadData.industry, jobTitle: leadData.jobTitle, budgetRange: leadData.budgetRange, // Form completion formCompletionTime: leadData.formCompletionTime, fieldsCompleted: leadData.fieldsCompleted, estimatedValue: leadData.leadValue }); } // Step 5: Sales Qualified function trackSalesQualified(qualifiedData) { trackFunnelStep({ funnelName: 'lead_generation', funnelType: 'sales', stepName: 'sales_qualified', stepNumber: 5, stepCategory: 'action', totalSteps: 6, stepsCompleted: 5, // Qualification specific qualificationMethod: qualifiedData.method, // 'phone', 'email', 'demo', 'self_service' qualificationCriteria: qualifiedData.criteria, salesRepAssigned: qualifiedData.salesRep, // Qualification metrics leadToQualificationDays: qualifiedData.leadToQualificationDays, touchpointsToQualification: qualifiedData.touchpoints, // Opportunity data opportunityValue: qualifiedData.opportunityValue, expectedCloseDate: qualifiedData.expectedCloseDate, winProbability: qualifiedData.winProbability, estimatedValue: qualifiedData.opportunityValue }); } // Step 6: Customer Converted function trackCustomerConversion(customerData) { trackFunnelStep({ funnelName: 'lead_generation', funnelType: 'sales', stepName: 'customer_converted', stepNumber: 6, stepCategory: 'action', totalSteps: 6, stepsCompleted: 6, // Conversion specific dealValue: customerData.dealValue, contractLength: customerData.contractLength, paymentTerms: customerData.paymentTerms, // Sales process salesCycleLength: customerData.salesCycleLength, touchpointsToClose: customerData.touchpointsToClose, competitorsConsidered: customerData.competitors, // Customer data customerSegment: customerData.segment, expansionPotential: customerData.expansionPotential, estimatedValue: customerData.dealValue }); } </script>
SaaS Onboarding Funnel
Trial → Activation → Conversion Funnel
<script> // Step 1: Trial Signup function trackTrialSignup(trialData) { trackFunnelStep({ funnelName: 'saas_conversion', funnelType: 'signup', stepName: 'trial_signup', stepNumber: 1, stepCategory: 'awareness', totalSteps: 7, stepsCompleted: 1, // Trial specific trialType: trialData.type, // 'free_trial', 'freemium', 'demo' trialLength: trialData.length, planSelected: trialData.plan, // Signup context signupSource: trialData.source, signupMethod: trialData.method, // 'email', 'google', 'sso' companySize: trialData.companySize, estimatedValue: trialData.planValue }); } // Step 2: Account Setup function trackAccountSetup(setupData) { trackFunnelStep({ funnelName: 'saas_conversion', funnelType: 'signup', stepName: 'account_setup', stepNumber: 2, stepCategory: 'interest', totalSteps: 7, stepsCompleted: 2, // Setup specific setupCompletionPercentage: setupData.completionPercentage, profileCompleted: setupData.profileCompleted, teamMembersInvited: setupData.teamInvited, // Setup quality setupTime: setupData.setupTime, helpDocsAccessed: setupData.helpAccessed, estimatedValue: setupData.planValue }); } // Step 3: First Value Action function trackFirstValue(valueData) { trackFunnelStep({ funnelName: 'saas_conversion', funnelType: 'signup', stepName: 'first_value', stepNumber: 3, stepCategory: 'consideration', totalSteps: 7, stepsCompleted: 3, // Value action specific valueAction: valueData.action, // 'first_project', 'first_report', 'first_integration' valueMetric: valueData.metric, valueAchieved: valueData.achieved, // Time to value signupToValueHours: valueData.timeToValue, sessionsToValue: valueData.sessionsToValue, estimatedValue: valueData.planValue }); } // Step 4: Feature Adoption function trackFeatureAdoption(adoptionData) { trackFunnelStep({ funnelName: 'saas_conversion', funnelType: 'signup', stepName: 'feature_adoption', stepNumber: 4, stepCategory: 'consideration', totalSteps: 7, stepsCompleted: 4, // Adoption specific coreFeatures: adoptionData.coreFeatures, advancedFeatures: adoptionData.advancedFeatures, featureAdoptionRate: adoptionData.adoptionRate, // Usage patterns dailyActiveUse: adoptionData.dailyActive, featureDepth: adoptionData.depth, // 'shallow', 'moderate', 'deep' estimatedValue: adoptionData.planValue }); } // Step 5: Habit Formation function trackHabitFormation(habitData) { trackFunnelStep({ funnelName: 'saas_conversion', funnelType: 'signup', stepName: 'habit_formation', stepNumber: 5, stepCategory: 'action', totalSteps: 7, stepsCompleted: 5, // Habit specific weeklyActiveUse: habitData.weeklyActive, consecutiveDaysUsed: habitData.consecutiveDays, habitScore: habitData.habitScore, // 1-100 // Engagement quality sessionDuration: habitData.avgSessionDuration, actionsPerSession: habitData.actionsPerSession, returnFrequency: habitData.returnFrequency, estimatedValue: habitData.planValue }); } // Step 6: Expansion Interest function trackExpansionInterest(expansionData) { trackFunnelStep({ funnelName: 'saas_conversion', funnelType: 'signup', stepName: 'expansion_interest', stepNumber: 6, stepCategory: 'action', totalSteps: 7, stepsCompleted: 6, // Expansion specific expansionType: expansionData.type, // 'seats', 'features', 'usage', 'tier' expansionTrigger: expansionData.trigger, // 'limit_reached', 'feature_request', 'team_growth' // Interest indicators pricingPageVisits: expansionData.pricingVisits, upgradeButtonClicks: expansionData.upgradeClicks, salesContactRequests: expansionData.salesContact, estimatedValue: expansionData.expansionValue }); } // Step 7: Paid Conversion function trackPaidConversion(conversionData) { trackFunnelStep({ funnelName: 'saas_conversion', funnelType: 'signup', stepName: 'paid_conversion', stepNumber: 7, stepCategory: 'action', totalSteps: 7, stepsCompleted: 7, // Conversion specific planUpgraded: conversionData.plan, subscriptionValue: conversionData.monthlyValue, annualValue: conversionData.annualValue, // Conversion context trialToPaidDays: conversionData.trialToPaidDays, conversionTrigger: conversionData.trigger, discountApplied: conversionData.discount, // Success metrics funnelCompletionRate: 100, totalFunnelTime: conversionData.totalFunnelTime, estimatedValue: conversionData.monthlyValue }); } </script>
Advanced Funnel Analytics
Funnel Drop-off Analysis
<script> function trackFunnelDropoff(dropoffData) { (function() { var options = { account: 'YOUR_ACCOUNT_ID_HERE', event: 'custom', label: 'Funnel Dropoff', ignore_pageview: 1, use_session: 1, properties: { // Dropoff identification funnel_name: dropoffData.funnelName, dropoff_step: dropoffData.stepName, dropoff_step_number: dropoffData.stepNumber, steps_completed: dropoffData.stepsCompleted, // Dropoff context time_on_step: dropoffData.timeOnStep, interactions_before_dropoff: dropoffData.interactions, exit_page: dropoffData.exitPage, // User context user_segment: dropoffData.userSegment, device_type: dropoffData.deviceType, traffic_source: dropoffData.trafficSource, // Dropoff reasons (inferred) form_errors: dropoffData.formErrors, loading_issues: dropoffData.loadingIssues, technical_problems: dropoffData.technicalProblems, // Behavioral indicators hesitation_indicators: dropoffData.hesitationIndicators, comparison_shopping: dropoffData.comparisonShopping, price_sensitivity: dropoffData.priceSensitivity, // Recovery opportunities retargeting_eligible: dropoffData.retargetingEligible, email_follow_up_sent: dropoffData.emailFollowUp, abandoned_cart_value: dropoffData.abandonedValue } }; var url="//app.sealmetrics.com/tag/v2/tracker";function loadScript(callback){var script=document.createElement("script");script.src=url;script.async=true;script.onload=function(){if(typeof callback==="function"){callback();}};script.onerror=function(){console.error("Error loading script: "+url);};document.getElementsByTagName("head")[0].appendChild(script);}loadScript(function(){options.id=Math.floor((Math.random()*999)+1);if(window.sm){var instance=new window.sm(options);instance.track(options.event);}else{console.error("sm2 plugin is not available");}}); })(); } // Auto-track dropoffs when users leave funnel pages window.addEventListener('beforeunload', function() { if (window.currentFunnelStep && !window.funnelStepCompleted) { trackFunnelDropoff({ funnelName: window.currentFunnelStep.funnelName, stepName: window.currentFunnelStep.stepName, stepNumber: window.currentFunnelStep.stepNumber, timeOnStep: Date.now() - window.stepStartTime }); } }); </script>
Funnel Optimization Tools
A/B Testing Integration
<script> function trackFunnelExperiment(experimentData) { (function() { var options = { account: 'YOUR_ACCOUNT_ID_HERE', event: 'custom', label: 'Funnel A/B Test', ignore_pageview: 1, use_session: 1, properties: { // Experiment details experiment_name: experimentData.experimentName, experiment_step: experimentData.funnelStep, variant: experimentData.variant, // Test configuration test_type: experimentData.testType, // 'page_layout', 'form_fields', 'copy', 'cta' hypothesis: experimentData.hypothesis, success_metric: experimentData.successMetric, // User allocation traffic_allocation: experimentData.trafficAllocation, user_segment: experimentData.userSegment, // Performance conversion_rate: experimentData.conversionRate, statistical_significance: experimentData.significance, confidence_level: experimentData.confidence, // Business impact revenue_impact: experimentData.revenueImpact, lift_percentage: experimentData.liftPercentage, // Test outcome test_result: experimentData.result, // 'winner', 'loser', 'inconclusive' implementation_status: experimentData.implementationStatus } }; var url="//app.sealmetrics.com/tag/v2/tracker";function loadScript(callback){var script=document.createElement("script");script.src=url;script.async=true;script.onload=function(){if(typeof callback==="function"){callback();}};script.onerror=function(){console.error("Error loading script: "+url);};document.getElementsByTagName("head")[0].appendChild(script);}loadScript(function(){options.id=Math.floor((Math.random()*999)+1);if(window.sm){var instance=new window.sm(options);instance.track(options.event);}else{console.error("sm2 plugin is not available");}}); })(); } </script>
Funnel Analytics Dashboard
Key Metrics Configuration
1. Funnel Performance Metrics
Overall Conversion Rate: End-to-end funnel conversion
Step-by-Step Conversion: Conversion rate between each step
Drop-off Analysis: Where users exit the funnel
Time to Convert: Average time from first touch to conversion
2. Segmentation Analysis
By Traffic Source: Which channels perform best
By Device Type: Mobile vs desktop performance
By User Type: New vs returning user behavior
By Geographic Location: Regional performance differences
3. Optimization Opportunities
Bottleneck Identification: Steps with highest drop-off
High-Value User Paths: Most profitable user journeys
Quick Wins: Easy improvements with high impact
Long-term Optimizations: Strategic funnel improvements
Custom Funnel Reports
// Funnel analysis configuration const funnelAnalysisConfig = { // Standard funnel reports conversionRates: { overall: 'Total funnel conversion rate', byStep: 'Step-by-step conversion rates', bySegment: 'Conversion rates by user segment', trends: 'Conversion rate trends over time' }, // Drop-off analysis dropoffAnalysis: { rates: 'Drop-off rates by step', reasons: 'Inferred drop-off reasons', recovery: 'Recovery and re-engagement rates', patterns: 'Drop-off pattern analysis' }, // Performance optimization optimization: { bottlenecks: 'Funnel bottleneck identification', experiments: 'A/B test performance tracking', improvements: 'Optimization impact measurement', roi: 'Return on optimization investment' } };
Automated Funnel Monitoring
<script> // Set up automated funnel performance monitoring function setupFunnelMonitoring() { // Monitor for significant drop-off increases if (window.funnelMetrics && window.funnelMetrics.dropoffIncrease > 20) { trackFunnelDropoff({ funnelName: window.funnelMetrics.funnelName, dropoffIncrease: window.funnelMetrics.dropoffIncrease, alertType: 'automated_monitoring' }); } // Monitor for conversion rate decreases if (window.funnelMetrics && window.funnelMetrics.conversionDecrease > 15) { trackFunnelExperiment({ experimentName: 'conversion_rate_monitoring', conversionRate: window.funnelMetrics.currentConversion, alertType: 'performance_decline' }); } } // Run monitoring checks every 4 hours setInterval(setupFunnelMonitoring, 14400000); </script>
This comprehensive funnel tracking system provides complete visibility into user progression through conversion funnels, enabling data-driven optimization and improved conversion rates while maintaining privacy compliance through Sealmetrics' consentless analytics approach.