Thunder Script is a lightweight, asynchronous snippet (typically added in your site’s <head>) that collects visitor, source, and login attribution data in real time. By embedding a small JavaScript file, Thunder can:
Identify visitors across sessions (durable device/user identifier)
Capture landing (first-visit) context: referrer, UTM parameters, and click IDs
Detect and attribute logins (when you provide customer info in localStorage)
Persist key attribution parameters while gracefully handling browser storage limitations
Thunder initially tracks visitors anonymously.Once the visitor authenticates, your application should store the customer information inside localStorage.user.Example:
Thunder automatically detects this object and sends a Login event.This links the anonymous visitor with the authenticated customer, allowing future purchases and interactions to be correctly attributed.
If you provide customer email or phone numbers, Thunder will transmit those values for attribution purposes.If your organization requires it, consider hashing or tokenizing customer identifiers before storing them.