Skip to main content
After installing DATALYR, verify that events are being tracked correctly before connecting ad accounts or launching campaigns.

Quick Verification

The fastest way to verify tracking is working:
  1. Visit your website or open your app
  2. Navigate to a few pages or screens
  3. Go to your DATALYR dashboard
  4. Click Events in the sidebar
  5. You should see page_view or app_open events within 10 seconds
If you see events appearing in real-time, tracking is working correctly.

Check Event Stream

The Event Stream shows all events in real-time as they come in.

Access Event Stream

  1. Go to Dashboard → [Your Workspace] → Events
  2. You should see a live stream of events
  3. Each event shows:
    • Event name (e.g., page_view, button_clicked)
    • Timestamp
    • Visitor ID
    • Properties (click to expand)

What to Look For

Page views should include:
  • Page URL or path
  • Referrer
  • UTM parameters (if coming from an ad)
  • Device and browser info
  • Visitor ID
Custom events should include:
  • Event name
  • Any properties you passed
  • Timestamp
  • Visitor ID

Test UTM Parameters

Test that UTM parameters are being captured correctly:

Web Tracking

  1. Create a test URL with UTM parameters:
    https://yoursite.com?utm_source=facebook&utm_medium=social&utm_campaign=test_campaign
    
  2. Visit this URL in a new incognito/private browser window
  3. Go to your DATALYR dashboard → Events
  4. Find the page_view event and expand it
  5. Verify these parameters are captured:
    • utm_source: facebook
    • utm_medium: social
    • utm_campaign: test_campaign

Mobile Tracking

For mobile apps, test deep links with UTM parameters:
yourapp://open?utm_source=facebook&utm_medium=paid&utm_campaign=test

Test Click IDs

Test that platform click IDs are being captured:

Facebook Click ID (fbclid)

Visit your site with a test fbclid:
https://yoursite.com?fbclid=test_abc123
Verify fbclid appears in the event properties.

Google Click ID (gclid)

Visit your site with a test gclid:
https://yoursite.com?gclid=test_xyz789
Verify gclid appears in the event properties.

TikTok Click ID (ttclid)

Visit your site with a test ttclid:
https://yoursite.com?ttclid=test_tiktok456
Verify ttclid appears in the event properties.

Test Custom Events

If you’ve added custom event tracking, test those events:

Web Custom Events

  1. Trigger the action (click button, submit form, etc.)
  2. Go to Events in your dashboard
  3. Find your custom event by name
  4. Verify all properties are correct
Example test for button click:
// In browser console
datalyr.track('test_button_click', {
  button_name: 'Test Button',
  location: 'testing'
});
Check the Events stream for test_button_click.

Mobile Custom Events

Trigger the event in your app and check the dashboard: iOS:
await DatalyrSDK.shared.track("Test Event", eventData: [
    "test_property": "test_value"
])
React Native:
await Datalyr.track('Test Event', {
  test_property: 'test_value'
});

Test User Identification

Test that user identification is working:

Web

datalyr.identify('test_user_123', {
  email: '[email protected]',
  name: 'Test User'
});

Mobile

iOS:
await DatalyrSDK.shared.identify("test_user_123", properties: [
    "email": "[email protected]"
])
React Native:
await Datalyr.identify('test_user_123', {
  email: '[email protected]'
});
After calling identify, check the Events stream for an $identify event with the user ID and properties.

Test Purchase Tracking

Test purchase or conversion tracking:

Web

datalyr.track('purchase', {
  order_id: 'TEST_ORDER_123',
  revenue: 99.99,
  currency: 'USD'
});

Mobile

iOS:
await DatalyrSDK.shared.trackPurchase(
    value: 99.99,
    currency: "USD",
    productId: "test_product"
)
React Native:
await Datalyr.trackPurchase(99.99, 'USD', 'test_product');
Verify the purchase event appears with correct revenue amount.

Check Browser Console

For web tracking, check the browser console for debug information:

Enable Debug Mode

Script Tag:
<script
  defer
  src="https://track.datalyr.com/dl.js"
  data-workspace-id="YOUR_WORKSPACE_ID"
  data-debug="true">
</script>
SDK:
datalyr.init({
  workspaceId: 'YOUR_WORKSPACE_ID',
  debug: true
});

Look for Console Logs

Open browser console (F12) and look for:
  • [DATALYR] Initialized
  • [DATALYR] Event tracked: page_view
  • [DATALYR] Event sent successfully
If you see errors, they will appear in red.

Check Mobile Logs

For mobile apps, check logs during development:

iOS Debug Logs

Enable debug mode:
let config = DatalyrConfig(
    apiKey: "dk_your_api_key",
    debug: true
)
Check Xcode console for:
  • [DATALYR] SDK initialized
  • [DATALYR] Event tracked: app_open
  • [DATALYR] Event sent successfully

React Native Debug Logs

Enable debug mode:
await Datalyr.initialize({
  apiKey: 'dk_your_api_key',
  debug: true
});
Check Metro console or device logs for DATALYR output.

Check Network Requests

Verify events are being sent to DATALYR servers:

Web

  1. Open browser DevTools (F12)
  2. Go to Network tab
  3. Filter for datalyr or track.datalyr.com
  4. Trigger an event (page view, button click, etc.)
  5. You should see a POST request to https://ingest.datalyr.com/events
  6. Check the request payload to see event data

Mobile

Use network debugging tools like Charles Proxy or Proxyman to inspect requests to https://api.datalyr.com.

Verify Visitor ID Persistence

Test that visitor IDs persist across sessions:
  1. Visit your site and note the visitor ID in an event
  2. Close the browser
  3. Open a new browser window and revisit your site
  4. Check that the visitor ID is the same
Visitor IDs should persist in cookies (web) or local storage (mobile).

Common Issues

No events appearing

Check:
  • Workspace ID or API key is correct
  • Script is loaded (check Network tab)
  • Ad blockers are disabled
  • You’re viewing the correct workspace
  • Events may take up to 10 seconds to appear
Web:
  • Script is in the <head> section
  • defer attribute is present
Mobile:
  • SDK is initialized before tracking events
  • Network connectivity is available
  • API key starts with dk_

Events appear but missing properties

Check:
  • Properties are passed correctly to tracking calls
  • Property names match what you expect
  • Console for any errors or warnings

Duplicate events

Web:
  • Make sure tracking script is only loaded once
  • Check that you’re not tracking the same event multiple times
Mobile:
  • Ensure SDK is initialized only once
  • Check for duplicate tracking calls

Wrong visitor ID

Check:
  • Cookies are enabled (web)
  • Local storage is available (mobile)
  • Not testing in incognito mode (visitor IDs don’t persist)

Test Before Going Live

Before connecting ad accounts or launching campaigns:
  • Page views are tracked on all pages
  • UTM parameters are captured correctly
  • Click IDs (fbclid, gclid, ttclid) are captured
  • Custom events fire correctly
  • Purchase/conversion events have correct revenue
  • User identification works
  • Visitor IDs persist across sessions
  • Events appear in dashboard within 10 seconds
  • No errors in browser console or mobile logs

Next Steps

Once tracking is verified:

Need Help?

Still having issues with tracking? Check our troubleshooting guide or contact support with:
  • Your workspace ID
  • Browser/device you’re testing on
  • Any error messages from console
  • Screenshot of Event Stream (if applicable)