1. Custom stores integration
Thunder
  • Custom stores integration
    • 1. Script integration
    • 2. Webhooks integration
    • Orders Webhook
      POST
    • Products Webhook
      POST
  1. Custom stores integration

1. Script integration

Thunder Script#

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 Script

Quick Start#

1.
Install the script (add to your <head>):
2.
On customer login, set their details in localStorage under the key user:
That’s it. Thunder will:
Send a one-time “landing” event for the session
Automatically send a “login” event once the user object is present and the landing is recorded

Privacy and Compliance#

Consent: Depending on your region (e.g., GDPR, CCPA), configure consent banners and ensure Thunder Script only runs and/or stores identifiers after consent where required.
Data you provide: If you store email and mobile in localStorage.user, Thunder will transmit those values as provided. Consider hashing or tokenizing customer identifiers on your side if required by your policies.
Cookies and storage: Thunder uses SameSite=Lax for cookies and prefers web storage when available.
No sensitive payment data: Thunder does not collect payment details by default.
Modified at 2026-03-25 09:34:46
Next
2. Webhooks integration
Built with