Skip to main content
Add DATALYR to your Funnelish funnels to track visitors, conversions, and revenue from paid ads.

Use Cases

Shopify Funnels Track your Shopify checkout funnels and see which ads drive the most revenue. High-Converting Funnels Monitor funnel performance, upsells, and order bumps with accurate attribution. Split Test Tracking Track performance across split test variations and see which ads work best for each variant. Post-Purchase Upsells Track upsell acceptance rates and attribute revenue back to original traffic sources.

Before You Start

  • You have a DATALYR account
  • You’ve created a workspace
  • You have a Funnelish account
  • You have a funnel created in Funnelish

Step 1: Get Your Tracking Code

  1. Log in to your DATALYR dashboard
  2. Go to Settings → Tracking
  3. Copy your tracking script:
<script
  defer
  src="https://track.datalyr.com/dl.js"
  data-workspace-id="YOUR_WORKSPACE_ID">
</script>

Step 2: Add to Funnelish Funnel

For All Pages in Funnel

  1. Open your funnel in Funnelish
  2. Go to Funnel Settings
  3. Click Tracking & Analytics
  4. Scroll to Custom Head Code
  5. Paste your DATALYR tracking script
  6. Click Save
This adds tracking to every page in the funnel.

For Individual Pages

  1. Open the page you want to track
  2. Click Page Settings (gear icon)
  3. Go to Tracking Codes
  4. Paste your DATALYR script in Head Code
  5. Click Save

Step 3: Verify Tracking Works

  1. Visit your published funnel in a new browser tab
  2. Go to your DATALYR dashboard
  3. Click Events in the sidebar
  4. You should see a page_view event within 10 seconds
If you see events, you’re done!

What Gets Tracked Automatically

Once installed, DATALYR automatically captures:
  • Page views on all funnel pages
  • Visitor IDs (persistent across sessions)
  • UTM parameters from ad campaigns
  • Ad click IDs (fbclid, gclid, ttclid)
  • Referrer and traffic source
  • Device and browser information

Track Opt-in Forms

Track form submissions on your opt-in pages:
  1. Open your opt-in page
  2. Go to Page Settings → Tracking Codes
  3. Add this to Footer Code:
<script>
  document.addEventListener('DOMContentLoaded', function() {
    const form = document.querySelector('form');
    if (form) {
      form.addEventListener('submit', function() {
        if (window.datalyr) {
          datalyr.track('lead_form_submission', {
            funnel_name: 'Lead Magnet Funnel',
            page_name: document.title
          });
        }
      });
    }
  });
</script>
Replace 'Lead Magnet Funnel' with your actual funnel name.

Track Shopify Purchases

If you’re using Funnelish with Shopify, track purchases on your thank you page:
  1. Go to your Thank You Page in Funnelish
  2. Open Page Settings → Tracking Codes
  3. Add this to Footer Code:
<script>
  if (window.datalyr && window.Shopify && window.Shopify.checkout) {
    var checkout = Shopify.checkout;

    datalyr.track('purchase', {
      order_id: checkout.order_id,
      revenue: parseFloat(checkout.total_price),
      currency: checkout.currency,
      items: checkout.line_items.map(function(item) {
        return {
          product_id: item.product_id,
          name: item.title,
          price: parseFloat(item.price),
          quantity: item.quantity
        };
      })
    });
  }
</script>

Track Upsell Acceptance

Track when users accept upsells or one-click upsells:
<script>
  if (window.datalyr) {
    datalyr.track('upsell_accepted', {
      product_name: 'Premium Upgrade',
      revenue: 97.00,
      currency: 'USD',
      funnel_step: 'upsell_1',
      upsell_type: 'one_click'
    });
  }
</script>
Add this to your upsell confirmation or thank you page.

Track Order Bumps

Track when users select order bumps on checkout pages:
<script>
  document.addEventListener('DOMContentLoaded', function() {
    // Find order bump checkbox
    const orderBumpCheckbox = document.querySelector('input[type="checkbox"][data-order-bump]');
    if (orderBumpCheckbox) {
      orderBumpCheckbox.addEventListener('change', function() {
        if (this.checked && window.datalyr) {
          datalyr.track('order_bump_selected', {
            product_name: 'Bonus Training',
            price: 47.00,
            currency: 'USD'
          });
        }
      });
    }
  });
</script>
Note: Selector may vary based on your Funnelish template. Inspect with browser dev tools (F12) to find correct selector.

Track Funnel Steps

Track progression through your funnel:
<script>
  if (window.datalyr) {
    datalyr.track('funnel_step_viewed', {
      funnel_name: 'Main Sales Funnel',
      step_name: 'Checkout Page',
      step_number: 2
    });
  }
</script>
Add different step numbers to each page in your funnel.

Identify Users

After collecting email addresses, identify users for cross-device tracking:
<script>
  if (window.datalyr) {
    datalyr.identify('[email protected]', {
      email: '[email protected]',
      funnel: 'Lead Magnet Funnel',
      source: 'opt_in_page'
    });
  }
</script>
Add this to your opt-in confirmation page or after form submission.

Track Split Tests

Track which split test variant users see:
<script>
  if (window.datalyr) {
    datalyr.track('split_test_variant_viewed', {
      test_name: 'Checkout Page Test',
      variant: 'Variant B',
      funnel_step: 'checkout'
    });
  }
</script>
Add to each variant page with the appropriate variant name.

Troubleshooting

Not seeing events? Check that:
  • Your tracking script is in Custom Head Code (not footer)
  • You’ve saved your funnel settings
  • Your workspace ID is correct
  • Ad blockers are disabled
  • You’re testing on the live funnel URL (not editor)
Shopify.checkout not available? The Shopify.checkout object is only available on Shopify checkout and thank you pages. Make sure you’re testing on the actual thank you page after completing a test order. Form tracking not firing? Funnelish forms may use different selectors depending on the template. Use browser dev tools (F12) to inspect your form and find the correct selector. Duplicate events? Make sure you only have the DATALYR script added once. Check both funnel-level and page-level tracking codes.

Next Steps

Need Help?

Having trouble with Funnelish tracking? Check our troubleshooting guide or contact support.