Custom/Self-Hosted – How to Track Foxycart Purchases
Why track Foxycart purchases?
Track the end-to-end purchase process from your site to checkout and successful purchase
Attribute sales to campaigns, traffic sources, A/B tests
Run split tests with purchase events as conversion goals
Preserve a cookie-free, privacy-compliant analytics stack—no banners required
Prerequisites
Your main website already loads the global
hmbl.min.js
script (36 kb, async).You have access to your Foxycart account with permission to modify custom templates.
Your Foxycart domain is whitelisted in your Humblytics dashboard.
Step-by-Step Setup
1 · Whitelist your Foxycart domain
In your Humblytics dashboard:
Navigate to Settings → Domains.
Add your Foxycart checkout domain to the whitelist.
Save the changes.
2 · Add Humblytics tracking to Foxycart
In your Foxycart admin panel:
Go to Settings → Templates → Custom Footer.
Add the Humblytics tracking code:
<!-- Start Humblytics Tracking Code -->
<script
async
src="https://app.humblytics.com/hmbl.min.js?id=YOUR_HUMBLYTICS_ID"
></script>
<!-- End Humblytics Tracking Code -->
{% if context == 'checkout' %}
<script>
window.Humblytics.trackPageView("/foxycart-checkout", {
domain: "your-domain.com",
});
</script>
{% endif %} {% if context == 'receipt' and first_receipt_display %}
<script>
window.Humblytics.trackPageView("/foxycart-receipt", {
domain: "your-domain.com",
});
</script>
{% endif %}
Replace
YOUR_HUMBLYTICS_ID
with your actual Humblytics ID from the dashboard.Replace
your-domain.com
with your main website domain.Save the template changes.
3 · Verify tracking is working
Complete a test purchase on your live site.
Open Dashboard → Pages in Humblytics.
Look for
/foxycart-checkout
and/foxycart-receipt
page views. Data appears within ~30 seconds.
Key Benefits
Cookie-free
No consent banners or CMP required
End-to-end tracking
Complete customer journey visibility
Works on every plan
All Humblytics tiers support custom events
Split test ready
Use purchase events as conversion goals
Setting Up Split Tests with Purchase Goals
1 · Create a split test on your main website
In Humblytics, navigate to Experiments → Create New Test.
Set up your A/B test variants on your main website.
Choose Destination Page as your goal type.
2 · Configure the conversion goal
Enter
/foxycart-receipt
as the destination page.Set No Overlap for more accurate results with purchase events.
Launch your split test.
Tip: For low-traffic sites, consider using
/foxycart-checkout
as the goal to gather data faster, though this will measure checkout initiation rather than completed purchases.
Optional Enhancements
Funnels: Create a funnel from your landing page → product page →
/foxycart-checkout
→/foxycart-receipt
to identify drop-off points.Campaign Attribution: Use UTM parameters on your marketing campaigns to see which sources drive the most sales.
Advanced Events: Track additional Foxycart events like cart abandonment or upsell interactions.
For advanced use cases—custom Foxycart events, multi-step funnels, or complex attribution models—email [email protected] and we'll guide you through.
Last updated
Was this helpful?