Skip to main content
After installing the SDK, verify that events are being tracked and data is flowing correctly.

Quick Verification

1

Enable Debug Mode

Add ?permutive_debug=true to any page URL where the SDK is installed.
2

Open Browser Console

Press F12 (or right-click > Inspect) and go to the Console tab.
3

Check for Initialization

Look for messages starting with [Permutive]:
[Permutive] SDK initialized
[Permutive] User ID: abc123...
[Permutive] Pageview tracked
4

Verify in Dashboard

Log in to your Permutive dashboard and check that events appear in the Events view.

Debug Mode

Debug mode provides detailed logging of SDK activity. Enable it by adding the query parameter to your URL:
https://yoursite.com/page?permutive_debug=true

Debug Output

With debug mode enabled, you’ll see console messages for:
  • SDK initialization status
  • User ID and session information
  • Events being tracked
  • Cohort/segment data
  • API requests and responses
  • Addon initialization
Example debug output:
[Permutive] SDK initialized
[Permutive] User ID: 7f8e9d0c-1b2a-3c4d-5e6f-7g8h9i0j1k2l
[Permutive] Config: {apiKey: "...", workspaceId: "..."}
[Permutive] Web addon initialized
[Permutive] Tracking: Pageview {type: "article", ...}
[Permutive] Event accepted: 1/1
[Permutive] Segments: [12345, 67890, ...]

Checking localStorage

The SDK stores data in localStorage. Open Developer Tools > Application > Local Storage and look for these keys:
KeyPurpose
permutive-idUser ID
permutive-consentConsent status
permutive-sessionSession data
_psegsCurrent segments (cohorts)
_pdfpsDFP/GAM segments
_papnsAppNexus segments
_prubiconsRubicon segments
Segment keys starting with _p contain arrays of cohort IDs that are passed to different ad platforms.

Checking Network Requests

In Developer Tools > Network tab, filter by permutive to see SDK requests:
RequestPurpose
live.jsSDK script load
/trackEvent tracking
/v2.0/*API requests

Successful Event Tracking

A successful track request shows:
  • Status: 200 or 202
  • Response includes event acknowledgment

Verification Checklist

Use this checklist to verify your integration:
  • permutive object exists on window
  • live.js loads without errors (check Network tab)
  • No Content Security Policy errors in console
  • Debug mode shows “SDK initialized” message
  • permutive-id key exists in localStorage
  • User ID is consistent across page loads
  • If setting identity, identify() call completes
  • Pageview event fires on page load
  • Debug mode shows “Event accepted: 1/1”
  • Network tab shows successful /track requests
  • Events appear in Permutive dashboard
  • _psegs key exists in localStorage
  • permutive.segments() returns array of cohort IDs
  • Cohorts update after qualifying behavior
  • Platform-specific segment keys exist (e.g., _pdfps for GAM)
  • Ad requests include Permutive targeting
  • Debug mode shows addon initialization

Console Commands

Use these commands in the browser console to verify SDK state:
// Check if SDK is loaded
console.log('SDK loaded:', !!window.permutive);

// Get user ID
console.log('User ID:', window.permutive?.user?.());

// Get current segments
permutive.segments(function(segs) {
  console.log('All segments:', segs);
});

// Get DFP segments
permutive.segments(function(segs) {
  console.log('DFP segments:', segs);
}, 'dfp');

// Check SDK readiness
permutive.ready(function() {
  console.log('SDK is ready');
});

// Check realtime data
permutive.ready(function() {
  console.log('Realtime data ready');
}, 'realtime');

Common Verification Issues

Problem: Adding ?permutive_debug=true shows no messages.Solutions:
  • Verify the SDK loader script is on the page
  • Check that live.js is loading (Network tab)
  • Look for JavaScript errors that might block SDK
  • Try clearing browser cache and reloading
Problem: Debug mode shows events accepted but nothing in dashboard.Solutions:
  • Wait a few minutes - there may be processing delay
  • Verify you’re viewing the correct workspace
  • Check the event date/time filters in dashboard
  • Confirm API key matches the workspace
Problem: permutive.segments() returns empty array.Possible causes:
  • User hasn’t qualified for any cohorts yet
  • Real-time data hasn’t loaded - use ready('realtime') callback
  • No cohorts are configured in dashboard
  • Consent not granted (if consentRequired: true)
Problem: Different user ID on each visit.Possible causes:
  • Cookies are being blocked or cleared
  • Private/incognito browsing mode
  • Cookie domain mismatch
  • Third-party cookie blocking (SDK uses first-party, so this is rare)
Solution: Check localStorage persistence and cookie settings.
Problem: Network requests fail with CORS errors.Solution: This usually indicates a configuration issue. Contact support with:
  • Your domain
  • API key (first few characters)
  • Screenshot of the error

Testing Specific Features

Testing Pageview Tracking

// Check if web addon is tracking
permutive.on('Pageview', function(event) {
  console.log('Pageview tracked:', event);
});

// Manually trigger for SPAs
var webAddon = permutive.addon('web');
webAddon.reset();  // Tracks new pageview

Testing Identity

// Set identity and verify
permutive.identify([
  { tag: 'test_id', id: 'test123' }
]);

// Check it was set (after a moment)
setTimeout(function() {
  console.log('Identity set');
}, 1000);

Testing Triggers

// Watch for segment entry
permutive.trigger(12345, 'segment', function(result) {
  console.log('Segment trigger:', result);
});

// Check segment membership
permutive.segment(12345, function(inSegment) {
  console.log('In segment 12345:', inSegment);
});

Dashboard Verification

In your Permutive dashboard:
  1. Events - Verify events are appearing with correct properties
  2. Sources - Check your website appears as an active source
  3. Cohorts - Verify users are qualifying for expected cohorts
  4. Activations - Check that cohorts are being sent to ad platforms

Production Verification

Before launching to production:
  • Remove any test/debug code
  • Verify loggingEnabled: false (or omitted) in production config
  • Test on multiple browsers (Chrome, Safari, Firefox, Edge)
  • Test on mobile devices
  • Verify consent flow works correctly (if applicable)
  • Check page load performance impact is acceptable
  • Validate ad targeting is working correctly

Getting Help

If verification fails:
  1. Check the Troubleshooting Guide
  2. Gather debug output and network logs
  3. Contact your Customer Success Manager or [email protected]

Next Steps