This guide walks you through setting up the Snapchat Conversions API using a server-side Google Tag Manager container provisioned by Seers. The setup uses a parallel tracking approach, sending events from both the browser via Snapchat Pixel and the server via the Conversions API, giving you the most accurate and resilient data collection for your Snapchat advertising campaigns.
Prerequisites
Before getting started, confirm the following are in place:
- Snapchat Ads Manager Access: Access to your Snapchat Ads Manager account, including the Events Manager for your specific Pixel. You will also need this for testing events. Refer to Snapchat's documentation on how to access the Events Manager.
- Pixel ID and Access Token: Both are required for the Conversions API and can be obtained from your Snapchat Events Manager. Refer to Snapchat's documentation for instructions on retrieving your Pixel ID and generating an access token.
- Web Google Tag Manager (GTM): A web GTM container already deployed on your website and configured to send GA4 events to your server-side GTM instance. Refer to Google's documentation on sharing GTM container access.
- Server-Side GTM Container (Seers): A server-side GTM container provisioned by Seers, accessible via a first-party endpoint, and configured to process GA4 events. Visit the Seers Get Started guide for setup instructions, and refer to GTM documentation for sharing container access.
Why Use Server-Side Tagging for Snapchat?
Greater Data Accuracy and Reliability
Server-side tagging is resilient to ad blockers and browser-level tracking restrictions such as Apple's ITP and ETP. Because data is sent directly from your server to Snapchat's server, it bypasses the user's browser entirely, resulting in a more complete and accurate conversion dataset.
Improved Website Performance
By moving the Snapchat Pixel execution off the user's browser and onto your server, you reduce client-side JavaScript load. This directly contributes to faster page load times and better Core Web Vitals, improving the overall experience for your users.
Greater Security and Data Control
Your CAPI Access Token is stored securely within the Seers server-side GTM container and is never exposed to the client's browser. You also gain full control over what data is sent to Snapchat, allowing you to hash, redact, or enrich information server-side before forwarding it, ensuring stronger data governance and privacy compliance.
Richer Data for Better Event Matching
The server-side environment allows you to supplement event data with information from other sources, such as a CRM or first-party database, before sending it to Snapchat. This provides more signals for event matching, increasing the likelihood that Snapchat can correctly attribute a conversion to the right campaign.
Implementation Overview
The setup follows a parallel tracking model. Events are sent simultaneously from two sources: the user's browser via Snapchat Pixel, and your server via the Snapchat Conversions API. Snapchat uses a unique Event ID to deduplicate these signals, ensuring each user action is counted only once. This parallel approach is recommended, though not strictly required by Snapchat. Once you have confirmed the Conversions API is performing as expected, you may choose to remove the Snapchat Pixel entirely.
Step 1: Parallel Tracking Implementation
Part A: Web GTM Configuration (Client-Side)
Configure your web GTM container to forward data to your Seers server-side container and fire the standard Snapchat Pixel for browser-level tracking.
| Note: The Snapchat Pixel template in the server container is compatible with Google Analytics events sent from the web container. The steps below assume Google Analytics is being fired from your web GTM container. |
Create a Unique Event ID Variable
For deduplication to work, every event must carry a unique ID that is identical across both the browser and server events for the same user action.
- In your Web GTM container, go to Variables and click New.
- Select Custom JavaScript Variable and paste in the following code:
function() {
var timestamp = new Date().getTime();
var randomNumber = Math.random().toString(36).substring(2);
return 'evt_' + timestamp + '_' + randomNumber;
} |
- Name this variable CJS - Unique Event ID.
Add the Event ID to Your GA4 Event Tags
On each GA4 event tag in your web container, add a parameter named event_id and set its value to the {{CJS - Unique Event ID}} variable.
Set Up the Snapchat Pixel Tag
- In your Web GTM container, go to Tags and click New.
- Click Tag Configuration and search for the Snapchat Pixel tag template in the Community Template Gallery.
- Enter your Snapchat Pixel ID in the designated field. It is best practice to store this value in a Constant variable for easy reuse.
- For the PageView event, and any other standard or custom events, insert the {{CJS - Unique Event ID}} variable in the Client Deduplication ID field.
- Set the trigger to All Pages for the base PageView tag. For other events, such as add_to_cart or purchase, apply the appropriate event-specific triggers.
| Important: The triggers used for your Snapchat Pixel tags must match exactly the triggers used for your corresponding Google Analytics tags. This ensures the same Event ID is shared between the browser and server events, which is essential for deduplication. |
Part B: Server-Side GTM Configuration
With the web container configured, set up the server container to receive the incoming data and forward it to Snapchat's Conversions API.
Set Up the Snapchat Conversions API Tag
- In your server-side GTM container, go to Templates and click Search Gallery in the Tag Templates section.
- Search for the Snapchat Conversions API tag, provided by Snapchat, and add it to your workspace.
- Go to Tags and click New. Click Tag Configuration and select the Snapchat Conversions API tag.
- Configure the following fields:
- Pixel ID: Enter the same Snapchat Pixel ID used in your web container.
- API Access Token: In your Snapchat Events Manager, navigate to Settings and generate an access token under the Conversions API section. Store this securely as a variable in your server-side GTM container.
- Event Name Mapping: Configure the tag to map GA4 event names to Snapchat standard events. You can use a RegEx Table or Lookup Table variable based on the built-in Event Name variable; for example, mapping purchase > PURCHASE. To apply this, select Override in the Event Name Setup Method dropdown and choose Custom, then add your mapping variable. Alternatively, if your event names already match Snapchat's accepted event name list, you can select Inherit from client in the dropdown instead.
- Action Source: Leave this set to Web.
- Server Parameters: Add the same event_id being sent from your web container via the GA4 tag. You may also include any additional server-specific parameters in this section. Refer to Snapchat's documentation for a full list of supported parameters.
- User Data Parameters: Add user-specific data here, such as country. Refer to Snapchat's documentation for a full list of available User Data Parameters.
- Custom Data Parameters: Add any additional parameters you need to pass, such as content_ids or order_id. Refer to Snapchat's documentation for more information on supported custom data fields.
Configure the Trigger
- Create a new Custom trigger and set it to fire when Client Name equals the name of your GA4 client. This ensures the tag fires on all events from your GA4 client.
- Ensure consent is validated at the trigger level, in line with Seers' consent guidelines.
- Consider allowlisting only the specific events you want to forward to Snapchat. This reduces noise in your analytics and limits the volume of data shared with third-party vendors.
Step 2: Quality Assurance
Testing is a critical part of this setup. Use the server-side GTM Preview mode alongside the Snapchat Events Manager Test Events tool to validate your implementation before going live.
- Enable Preview mode in both your Web GTM and server-side GTM containers.
- On your website, perform the actions that trigger your conversion events, for example, complete a test purchase.
- In the server-side GTM Preview panel, select the relevant GA4 event from the left-hand side.
- Check the Incoming Request tab to review the data received from the client container.
- Check the Outgoing HTTP Requests tab and confirm that a request is being sent from your Snapchat tag to https://tr.snapchat.com/…
- Verify that the payload contains correctly hashed user data and accurate event details.
- In Snapchat Ads Manager, open the Test Events tool within Events Manager. Confirm that server-side events are arriving in near real-time and review the event match quality score displayed there.
Step 3: Deploy and Monitor
Once all checks have passed and you are satisfied that the setup is working correctly, you are ready to go live.
Publish Your Containers
Submit and publish the pending changes in both your Web GTM and server-side GTM containers to make everything live.
Monitor
Over the following days, keep a close eye on the Snapchat Events Manager. Monitor event volume, match rates, and check for any reported errors or unexpected discrepancies in your conversion data.
Decommission the Client-Side Pixel (Optional)
Once you are confident that the server-side implementation is stable and capturing all required data reliably, you may choose to remove the Snapchat Pixel from your Web GTM container. This is optional but recommended, as it reduces client-side JavaScript and delivers the full performance benefits of server-side tagging.
Common Challenges and Solutions
Challenge: Events Are Not Being Deduplicated
Solution: The most likely cause is a mismatch in the event_id value. Use Preview mode in both containers to confirm that the exact same event_id is being sent from both the browser Pixel and the server CAPI tag for the same user action. Also, verify that the event names are identical on both sides, for example, add_to_cart in the browser must match add_to_cart on the server.
Challenge: Server Events Not Appearing in Snapchat
Solution: Open the server-side GTM Preview mode and navigate to the Tags tab to check whether the CAPI tag fired. If it shows as failed, open the Outgoing HTTP Requests section and check the Response tab. This will typically display an error message from Snapchat explaining why the event was rejected, pointing you toward the fix.