Create new Snap Conversions API v3 destination with intelligent event mapping and batching #3192
+5,468
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR creates a new separate destination called
snap-conversions-v3
with enhanced functionality for Snapchat Conversions API integration, while preserving the existingsnap-conversions-api
destination unchanged for backward compatibility.New Destination: Snap Conversions API v3
The new destination provides four specialized actions with intelligent defaults and enhanced functionality:
1. Track Event (
trackEvent
)type = "track"
2. Track App Event (
trackAppEvent
)type = "track" and context.device.type != null
3. Track Purchase (
trackPurchase
)type = "track" and event = "Order Completed"
4. Sync User Data (
syncUserData
)type = "identify"
Key Features
Intelligent Event Mapping
The
trackEvent
action automatically maps Segment event names to Snapchat event names:Batching Support
All new actions support batching up to 2,000 events per request (Snapchat API limit):
Enhanced Default Mappings
Each action includes optimized default field mappings:
action_source: 'website'
, standard field mappingsaction_source: 'app'
, app-specific mappingsevent_name: 'PURCHASE'
, ecommerce mappingsevent_name: 'UPDATE_PROFILE'
, user profile mappingsTechnical Implementation
snap-conversions-v3
destination preserves existing integrationsprocessHashing
utilityBenefits
This implementation provides a more intuitive and powerful interface for sending conversion data to Snapchat while maintaining full compatibility with existing integrations.
Fixes #3191.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.