I need to build a tracking system for affiliate marketing on Shopify and I’m stuck on the technical approach. Here’s what my extension needs to do:
Landing page functionality: Extract referral_code from URL parameters, generate a browser fingerprint using JavaScript, then POST both values to my backend API.
Checkout completion page: Create another browser fingerprint, combine it with order details, and send everything to my server via POST request.
Compatibility requirement: Must work for regular Shopify stores, not just Plus tier merchants.
I can handle all the server-side logic myself. The challenge is implementing the client-side tracking.
What I’ve attempted so far:
- Web Pixel extension - only functions after users accept cookie consent, which won’t work for my use case.
- Shopify Script Tags - perfect solution but getting deprecated in August.
- Checkout extensions - limited to Plus merchants only.
- Theme app blocks - would involve custom JavaScript blocks but violates Shopify’s affiliate tracking policies.
- GraphQL API - can retrieve order data but can’t execute JavaScript for fingerprinting.
Any suggestions on the right approach for this?