Configure tracking parameters and event collection
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'
});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
});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'
});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']
});Complete this guide and explore more resources to master Navlens
Go to Dashboard