Skip to main content
Audience Insights

Audience Insights gives marketers full visibility into how their audience is exploring their website before, during, and after the event.

Updated over a month ago

Overview

Sequel's website analytics toolkit helps you track page views and user interactions while respecting privacy regulations.

Quick Start

// Initialize without tracking 
Sequel.init('your-company-id');

// Enable tracking when user consents
Sequel.initializeTracking();

Installation

Add the Sequel script to your HTML:

​<script type="module" src="https://prod-assets.sequelvideo.com/uploads/toolkit/sequel.js"></script>

Core Features

1. Basic Tracking Setup

Initialize Sequel without tracking:

Sequel.init('your-company-id');

Enable tracking after user consent:

Sequel.initializeTracking();

This will:

  • Set a consent cookie

  • Generate anonymous user/session IDs

  • Begin tracking page views

  • Track user identification events

Disable tracking:

Sequel.disableTracking();

Integration Examples

With Ketch

// Initialize without tracking 
Sequel.init('your-company-id');

window.ketch?.ready().then(() => {
window.ketch?.getConsent().then((consent) => {
if (consent?.purposes?.analytics?.allowed) {
Sequel.initializeTracking();
}
});

// Listen for consent changes
window.ketch?.addEventListener('consentChanged', () => {
window.ketch?.getConsent().then((consent) => {
if (consent?.purposes?.analytics?.allowed) {
Sequel.initializeTracking();
} else {
Sequel.disableTracking();
}
});
});
});

With OneTrust

// Initialize without tracking 
Sequel.init('your-company-id');

OneTrust?.onConsentChanged(function(category) {
if (category.Analytics) {
Sequel.initializeTracking();
} else {
Sequel.disableTracking();
}
});

With Cookiebot

// Initialize without tracking
Sequel.init('your-company-id');

window.addEventListener('CookiebotOnAccept', function() {
if (Cookiebot.consent.statistics) {
Sequel.initializeTracking();
}
});

Manual Consent Implementation

// Initialize without tracking
Sequel.init('your-company-id');

document.getElementById('acceptAnalytics').addEventListener('click', function() { Sequel.initializeTracking();
});

document.getElementById('rejectAnalytics').addEventListener('click', function() { Sequel.disableTracking();
});

Cookie Management

The toolkit uses these cookies:

  • sequel-consent: Tracks consent status

  • sequelUserId: Anonymous user ID

  • sequelSessionId: Session tracking

All cookies are set with:

  • Secure flag

  • SameSite=strict

  • 1-year expiration (consent/user) or 1-day (session)

Best Practices

Privacy & Consent

  • Always get explicit consent before enabling tracking

  • Use initializeTracking() only after consent

  • Call disableTracking() when consent is withdrawn

  • Respect user privacy choices

Implementation

// ❌ Don't automatically enable tracking
Sequel.init('company-id');
Sequel.initializeTracking(); // Wrong!

// βœ… Do wait for consent
Sequel.init('company-id');
consentManager.onAccept(() => {
Sequel.initializeTracking();
});

Troubleshooting

Common Issues

  • Tracking not working:

// Verify initialization
console.log(Sequel.hasConsent); // Should be true
console.log(Sequel.userId); // Should exist
  • Missing user data:

    • Check identify calls

    • Verify consent status

    • Monitor network requests

API Reference

Core Methods

// Initialize SDK
Sequel.init(companyId: string): void

// Enable tracking with consent
Sequel.initializeTracking(): void

// Disable tracking
Sequel.disableTracking(): void

// Identify user
Sequel.identify(
email: string,
details?: {
name?: string;
companyName?: string;
title?: string;
}
): void

Support

For additional help:

Remember to:

  • Always get consent before tracking

  • Test in development environment first

  • Monitor your implementation

  • Keep privacy regulations in mind

Did this answer your question?