Skip to content

Analytics Providers Overview

Configure analytics providers to send events to multiple platforms. The SDK supports Google Tag Manager, Direct GA4 integration, Facebook Pixel, RudderStack, and custom webhooks.

Enable multiple providers in your configuration:

window.nextConfig = {
apiKey: 'your-api-key',
storeName: 'my-store', // Important for Facebook deduplication
analytics: {
enabled: true,
mode: 'auto',
providers: {
gtm: { enabled: true },
facebook: { enabled: true, settings: { pixelId: 'xxx' } },
rudderstack: { enabled: true },
custom: { enabled: true, settings: { endpoint: 'https://...' } }
}
}
};
ProviderBest ForSetup ComplexityAuto-Deduplication
Google Tag ManagerEvent tracking & conversion measurementLowYes (via GTM)
Direct GA4 (No GTM)Simple GA4 tracking without GTMVery LowYes (automatic)
Facebook PixelConversion tracking & audience buildingMediumYes (with storeName)
RudderStackData warehouse integration & CDPHighYes (via RudderStack)
Custom WebhookThird-party integrations & APIsMediumManual

Each provider operates independently. If one provider fails or is temporarily unavailable:

  • Other providers continue to receive and process events normally
  • Failed requests do not block the event pipeline
  • Your analytics data is safely distributed across multiple platforms
  • No single point of failure exists

You can enable any combination of providers simultaneously:

Enable all providers for data collection across multiple platforms:

analytics: {
providers: {
gtm: { enabled: true },
facebook: { enabled: true, settings: { pixelId: 'YOUR_PIXEL_ID' } },
rudderstack: { enabled: true },
custom: { enabled: true, settings: { endpoint: 'https://your-api.com/events' } }
}
}

Choose only the providers you need:

analytics: {
providers: {
gtm: { enabled: true },
facebook: { enabled: true, settings: { pixelId: 'YOUR_PIXEL_ID' } },
rudderstack: { enabled: false },
custom: { enabled: false }
}
}
  1. Choose which providers you need
  2. Follow the provider-specific setup guide
  3. Test event delivery in your development environment
  4. Deploy to production