Sprusify

Tracking Clicks & Conversions

Accurate click and conversion tracking is the foundation of attribution. This page explains how Sprusify records click events, sets cookies, and attributes orders.

Click capture

  • Tracking links include an affiliate parameter; when a visitor follows the link, Sprusify sets a cookie containing affiliate_id and click_id.
  • Some implementations use server-side proxied links to record clicks before redirecting to the store.

Cookie and coupon attribution

  • Cookie-first: if the cookie exists at checkout, the system attributes the order to that affiliate.
  • Coupon-first: if the customer uses an affiliate coupon code, that takes precedence as a reliable cross-device method.

Conversion attribution

  • On orders/create webhook, the app examines cookies and coupon codes to find a match and creates a conversion record linked to affiliate_id and order_id.
  • If no direct match exists, fallback heuristics (last-click within window) may be applied depending on settings.

Edge cases

  • Cross-device purchases: recommend coupon usage to preserve attribution.
  • Cookie blocking: modern browsers and privacy modes may clear cookies; provide server-side or coupon fallbacks.

Logging & audit

  • Record click_id, timestamp, affiliate_id, referer, and user-agent for each click to support disputes and audits.

Developer notes

  • Ensure the tracking snippet preserves query parameters and avoids double-redirects that strip UTM/affiliate params.
  • Implement robust webhook verification and idempotency to avoid duplicate conversions.

Combining cookie and coupon attribution with careful logging yields the most reliable attribution coverage across browsers and devices.

  • Client-side (JS): easy to implement and supports most tracking needs.
  • Server-side (recommended for reliability): use webhooks or server-to-server APIs to supplement client-side tracking for customers that block JS.

Attribution details

  • Attribution window: configurable per campaign; default is often 30 days.
  • Priority rules: coupons may override tracking links if both are present, depending on settings.

Troubleshooting checklist

  1. Verify tracking query parameters are present on landing pages.
  2. Confirm cookies are being set (test in browser devtools > Application > Cookies).
  3. Check that the post-checkout script is present and executed on the thank-you page.
  4. Review webhook logs for order events and ensure deliveries succeeded.

Best practices

  • Use UTM tags on links for channel-level reporting.
  • Implement server-side fallback reporting to catch clients with strict ad-blockers.