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.
Provider Configuration
Section titled “Provider Configuration”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://...' } } } }};Providers Comparison
Section titled “Providers Comparison”| Provider | Best For | Setup Complexity | Auto-Deduplication |
|---|---|---|---|
| Google Tag Manager | Event tracking & conversion measurement | Low | Yes (via GTM) |
| Direct GA4 (No GTM) | Simple GA4 tracking without GTM | Very Low | Yes (automatic) |
| Facebook Pixel | Conversion tracking & audience building | Medium | Yes (with storeName) |
| RudderStack | Data warehouse integration & CDP | High | Yes (via RudderStack) |
| Custom Webhook | Third-party integrations & APIs | Medium | Manual |
Provider Independence
Section titled “Provider Independence”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
Using Multiple Providers
Section titled “Using Multiple Providers”You can enable any combination of providers simultaneously:
All Providers
Section titled “All Providers”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' } } }}Selective Providers
Section titled “Selective Providers”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 } }}Provider Setup Guides
Section titled “Provider Setup Guides”Built-in Providers
Section titled “Built-in Providers”- Google Tag Manager - Container setup and variable configuration
- Facebook Pixel - Conversion tracking and audience building
- RudderStack - Data warehouse and CDP integration
- Custom Webhook - Third-party API integration
Alternative Integrations
Section titled “Alternative Integrations”- Direct GA4 (No GTM) - Send events directly to Google Analytics 4 without GTM
- Event Transformers - Build custom transformers for any platform (TikTok, Snapchat, Pinterest, etc.)
Next Steps
Section titled “Next Steps”- Choose which providers you need
- Follow the provider-specific setup guide
- Test event delivery in your development environment
- Deploy to production