JavaScript SDK
Everything on the global window.FindIP object. The SDK never collects passwords, card numbers, raw emails, or form contents — only metadata.
FindIP.init(options)
Called automatically on script-tag install; call manually for bundler installs.
FindIP.init({
siteKey: 'pub_xxxxxxxxx', // required
privacyMode: 'balanced', // strict | balanced | advanced
autoTrack: true,
autoDetectForms: true,
pushToDataLayer: true,
consentRequired: false,
noConsentMode: 'strict', // strict | disabled
endpoint: 'https://shield.findip.net/v1/shield/track',
debug: false,
maxPayloadBytes: 32768,
sessionCookieDurationMinutes: 30,
visitorCookieDurationDays: 30,
});FindIP.track(eventName, context)
Track an event with optional customer context.
FindIP.track('signup_attempt', {
email_domain: 'gmail.com',
plan: 'free',
user_id_hash: 'abc123...',
custom: { referral: 'partner_x' },
});Allowed context fields: user_id_hash, email_hash, email_domain, account_age_days, plan, transaction_amount, currency, form_name, lead_source, custom. Anything else is dropped.
Session & consent
FindIP.getSession() returns { sessionId, visitorId } — pass the session id to your backend for server-side verification.
FindIP.setConsent(true);
FindIP.setConsent(false);
FindIP.setConsent({
security_storage: 'granted',
analytics_storage: 'denied',
});Debugging: FindIP.init({ siteKey: '...', debug: true }) logs SDK activity to the console. FindIP.version reports the loaded version.
Privacy guarantees
The SDK never collects passwords, credit card numbers, raw emails, or full form contents. Only metadata (field types, counts, button text category) is sent — see Data Collection for the field-level breakdown and Events for the payload schema.