UGCBloom Logo MarkUGCBloom Wordmark

Tracking & referrals

window.UGCBloom

Read the active referral state from JavaScript on any page where the pixel is installed. Useful for showing the bound creator in your UI (e.g. “you're shopping via Annie”) or firing custom analytics events.

anywhere in your client code
javascript
window.UGCBloom.code         // "ANNIE50" | null
window.UGCBloom.handle       // "annie" | null
window.UGCBloom.creatorId    // "user_abc123" | null
window.UGCBloom.campaignId   // "uuid" | null
window.UGCBloom.sessionId    // "uuid"

// Fire a custom event
window.UGCBloom.fire("added_to_cart", { sku: "tshirt-blue", price_cents: 2999 });

The JS API is your hook for everything custom. Read these values from your own client code to display the bound creator's avatar, drive a custom checkout form, or fire custom analytics events.