Documentation/Tracking Configuration

Tracking Configuration

Configure tracking parameters and event collection

Estimated Time
12-15 minutes
Difficulty
Intermediate
1

Basic Event Tracking Setup

Configure core tracking parameters

Set up basic event tracking for your website via Settings > Tracking Configuration.

CODE EXAMPLE

navlens.track('page_view', {
  page: '/dashboard',
  referrer: document.referrer
});

navlens.track('button_click', {
  buttonText: 'Sign Up',
  location: 'hero'
});
2

Custom Event Tracking

Track custom user interactions

Create custom events to track specific user actions relevant to your business.

CODE EXAMPLE

navlens.trackEvent('form_submit', {
  formName: 'contact-form'
});

navlens.trackEvent('purchase', {
  productId: '12345',
  amount: 99.99
});
3

User Identification

Set up user identification for better analytics

Identify users to track their journey across sessions and understand long-term behavior patterns.

CODE EXAMPLE

navlens.identify(userId, {
  email: user.email,
  plan: user.plan
});

navlens.setUserProperties({
  premium: true,
  region: 'US'
});
4

Excluding Sensitive Data

Protect sensitive information from tracking

Configure Navlens to ignore passwords, credit cards, and personal data for GDPR compliance.

CODE EXAMPLE

navlens.configure({
  excludeSelectors: [
    'input[type="password"]',
    '[data-sensitive]'
  ],
  maskInputs: ['credit_card']
});

Ready to Get Started?

Complete this guide and explore more resources to master Navlens

Go to Dashboard