Auto Click ID Capture
Automatically captures gclid, fbclid, ttclid from URL
Server-Side Tracking
Bypasses ad blockers for reliable attribution
Auto User Enrichment
User data from auth state included automatically
Auto Hashing
PII data hashed with SHA-256 before sending
Overview
Conversion Destinations is a CDP (Customer Data Platform) feature built into Analytics. Forward events to Google Ads, Meta (Facebook), and TikTok with a single API call.
track('purchase', { value: 99.99 })
↓
Analytics Service
↓
┌────┴────┐
↓ ↓
Internal Destinations
Storage ├── Google Ads Offline Conversions
├── Meta Conversions API
└── TikTok Events APIWhy Server-Side?
Quick Start
The SDK automatically captures click IDs and enriches conversion data. Just track events:
import { useAnalytics } from '@sylphx/sdk/react'
function CheckoutSuccess({ order }) {
const { track } = useAnalytics()
useEffect(() => {
// Click IDs (gclid, fbclid, ttclid) are auto-captured from URL
// User data (email, name) is auto-enriched from auth state
track('purchase', {
value: order.total,
orderId: order.id,
}, {
destinations: ['google_ads', 'meta'],
conversion: {
value: order.total,
currency: 'USD',
orderId: order.id,
// clickId, userEmail, userFirstName, userLastName
// are all automatically included!
}
})
}, [order])
return <div>Thank you!</div>
}Zero Configuration
useConversionTracking Hook
Use the dedicated useConversionTracking hook for the cleanest conversion tracking:
import { useConversionTracking } from '@sylphx/sdk/react'
function CheckoutSuccess({ order }) {
const { trackConversion, clickIds, primaryClickId } = useConversionTracking()
useEffect(() => {
// Simplest conversion tracking - auto-enriched with click IDs and user data
trackConversion('purchase', {
value: order.total,
currency: 'USD',
orderId: order.id,
})
}, [order])
// Optional: Check if user came from ads
if (primaryClickId) {
console.log('User came from ad campaign')
}
return <div>Thank you!</div>
}| Property | Type | Description |
|---|---|---|
trackConversion | function | Track conversion event with auto-enrichment |
clickIds | ClickIds | Auto-captured click IDs { gclid?, fbclid?, ttclid? } |
primaryClickId | string | undefined | First available click ID (gclid > fbclid > ttclid) |
Auto-Capture & Enrichment
Click ID Auto-Capture
When the SylphxProvider mounts, it automatically:
- Captures
gclid(Google Ads) from URL - Captures
fbclid(Meta/Facebook) from URL - Captures
ttclid(TikTok) from URL - Stores click IDs in localStorage with 90-day expiry
Auto-Enrichment
When you include conversion data in a track() call, the SDK automatically adds:
| Property | Type | Description |
|---|---|---|
clickId | auto | Primary click ID (gclid > fbclid > ttclid) |
userEmail | auto | From authenticated user state |
userFirstName | auto | Parsed from user name |
userLastName | auto | Parsed from user name |
Override Auto-Enrichment
Manual Control
For advanced use cases, you can override auto-enrichment or specify exact destinations:
import { useAnalytics } from '@sylphx/sdk/react'
const { track } = useAnalytics()
// Override auto-enriched values
track('purchase', {
value: 99.99,
orderId: 'ORDER-123',
}, {
destinations: ['google_ads'], // Only forward to Google Ads
conversion: {
clickId: customClickId, // Override auto-captured click ID
userEmail: customEmail, // Override auth state email
userPhone: '+1234567890', // Add phone (not in auth state)
value: 99.99,
currency: 'USD',
orderId: 'ORDER-123',
}
})
// Skip destinations entirely
track('internal_event', { data: '...' }, {
skipDestinations: true
})const { trackConversion } = useConversionTracking()
// Override auto-enrichment and specify destinations
trackConversion('purchase', {
value: 99.99,
currency: 'USD',
orderId: 'ORDER-123',
}, {
clickId: customClickId, // Override click ID
userEmail: customEmail, // Override email
destinations: ['google_ads'], // Only forward to these destinations
})Supported Platforms
Google Ads
Send offline conversions to Google Ads for better attribution and smart bidding optimization.
Required credentials:
• Client ID (OAuth)
• Client Secret
• Refresh Token
• Customer ID (e.g., 123-456-7890)
• Conversion Action IDMeta (Facebook)
Send events to Meta Conversions API for improved tracking and lookalike audiences.
Required credentials:
• System User Access Token
• Pixel IDTikTok
Send events to TikTok Events API for conversion tracking and optimization.
Required credentials:
• Access Token
• Pixel CodeConversion Data Reference
All conversion data fields. Auto-enriched fields are marked:
| Property | Type | Description |
|---|---|---|
clickId | string (auto) | Ad platform click ID - auto-captured from URL |
value | number | Conversion value (e.g., purchase amount) |
currency | string | ISO 4217 currency code (e.g., USD) |
orderId | string | Unique order/transaction ID |
userEmail | string (auto) | User email - auto-enriched from auth state, SHA-256 hashed |
userPhone | string | User phone - must be provided, SHA-256 hashed |
userFirstName | string (auto) | First name - auto-enriched from user name, SHA-256 hashed |
userLastName | string (auto) | Last name - auto-enriched from user name, SHA-256 hashed |
Privacy
Auto-Forward Configuration
Configure destinations to auto-forward specific events without explicit destination params:
Destination: Google Ads
├── Auto-forward: ✓ Enabled
├── Event filter: purchase, signup, add_to_cart
└── All events matching filter are forwarded automatically// With auto-forward configured, this automatically goes to destinations
// Click IDs and user data are auto-enriched
track('purchase', {
value: 99.99,
orderId: 'ORDER-123',
})
// Skip auto-forward for specific events
track('internal_event', { data: '...' }, {
skipDestinations: true // Won't forward to any destination
})Built-in Auto-Tracking
The SDK automatically tracks key conversion events with destination support:
| Property | Type | Description |
|---|---|---|
$signup | auto | Tracked on user registration with conversion data |
$purchase | auto | Tracked on subscription checkout with value and orderId |
These auto-tracked events include conversion data and are forwarded to any configured auto-forward destinations.
Delivery Logs
Monitor destination delivery status in your app dashboard:
| Property | Type | Description |
|---|---|---|
pending | status | Event queued for delivery |
sent | status | Request sent to platform |
delivered | status | Platform confirmed receipt |
failed | status | Delivery failed (can retry) |
Failed deliveries can be retried from the dashboard. View detailed error messages and platform responses for debugging.
Best Practices
Use the SylphxProvider Early
Mount SylphxProvider at your app root to capture click IDs on first page load.
Let Auto-Enrichment Work
Don't manually capture click IDs or pass user data - the SDK handles this automatically. Only override when you have a specific reason.
Use Unique Order IDs
Always include order IDs to enable deduplication. Platforms use this to prevent double-counting.
Monitor Delivery Rates
Check delivery logs regularly. Low success rates usually indicate credential issues or misconfigured conversion actions.
Pricing
Destination forwarding is billed separately from analytics events:
| Property | Type | Description |
|---|---|---|
Analytics Events | $0.50 / 10K | Storage and dashboards (10K free/month) |
Destination Forwards | $0.10 / 1K | Per destination (100 free/month per destination) |