GrowthMetrics Pixel Implementation Guide

This guide shows you how to properly implement the RevMetrics tracking pixel on your website.

Important: Make sure to replace YOUR_PIXEL_ID with your actual pixel ID in all code examples.

Basic Implementation

Add the following code to the <head> section of your website:


<!-- GrowthMetrics Tracking Pixel -->
<script>
  (function(w, d, s, p) {
    w['GrowthMetricsPixel'] = w['GrowthMetricsPixel'] || function() {
      (w['GrowthMetricsPixel'].q = w['GrowthMetricsPixel'].q || []).push(arguments)
    };

    // Load the pixel script
    var js, fjs = d.getElementsByTagName(s)[0];
    js = d.createElement(s);
    js.async = 1;
    js.src = 'https://pixel.growthmetrics.me/tracker.js';
    fjs.parentNode.insertBefore(js, fjs);

    // Initialize with your pixel ID
    w['GrowthMetricsPixel']('init', 'YOUR_PIXEL_ID', {
      debug: false
    });

    // Track page view automatically
    w['GrowthMetricsPixel']('trackPageView');
  })(window, document, 'script');
</script>
            

Debug Mode Implementation

For testing and troubleshooting, use this version with debug mode enabled:


<!-- GrowthMetrics Tracking Pixel (Debug Mode) -->
<script>
  (function(w, d, s, p) {
    w['GrowthMetricsPixel'] = w['GrowthMetricsPixel'] || function() {
      (w['GrowthMetricsPixel'].q = w['GrowthMetricsPixel'].q || []).push(arguments)
    };

    // Load the pixel script
    var js, fjs = d.getElementsByTagName(s)[0];
    js = d.createElement(s);
    js.async = 1;
    js.src = 'https://pixel.growthmetrics.me/tracker.js';
    fjs.parentNode.insertBefore(js, fjs);

    // Initialize with your pixel ID and debug mode
    w['GrowthMetricsPixel']('init', 'YOUR_PIXEL_ID', {
      debug: true
    });

    // Track page view automatically
    w['GrowthMetricsPixel']('trackPageView');
  })(window, document, 'script');
</script>
            

Tracking Events

You can track different types of events using the RevMetricsPixel function:

Page Views


GrowthMetricsPixel('trackPageView', {
  url: window.location.href,
  title: document.title,
  path: window.location.pathname
});
            

Conversions


GrowthMetricsPixel('trackConversion', {
  value: 99.99,
  currency: 'USD',
  transactionId: 'ORDER-123456'
});
            

Leads


GrowthMetricsPixel('trackLead', {
  formId: 'contact-form',
  leadType: 'newsletter',
  source: 'homepage'
});
            

Clicks


GrowthMetricsPixel('trackClick', {
  elementId: 'cta-button',
  elementText: 'Sign Up Now'
});
            

Common Issues & Troubleshooting

IssueSolution
No events showing up
  • Check if the pixel script is loading (look for network requests to tracker.js)
  • Make sure you're using the correct pixel ID
  • Check for JavaScript errors in the console
  • Enable debug mode to see detailed logs
CORS errors
  • Make sure your domain is allowed in the pixel settings
  • Check if the pixel.growthmetrics.me domain is accessible from your website
Script loading errors
  • Verify that the tracker.js URL is correct
  • Check if the domain is accessible
Events not showing in dashboard
  • Events may take a few minutes to appear
  • Check if the events are being sent (network tab)
  • Verify that the pixel is active in your dashboard
Pro Tip: Always test your pixel implementation with debug mode enabled first, then switch to production mode once everything is working correctly.
← Back to Home