Stape
Search
Try for free

How to set up Snapchat Conversion API using server Google Tag Manager

Updated
Sep 10, 2024
Published
Apr 3, 2022
Also available in

Tracking restrictions have a massive effect on the accuracy of analytics data. The latest updates from Apple have caused quite an issue among businesses relying on advertising - all apps must ask the user’s permission before using any trackers, plus Safari started to block cookies. 

According to recent research, around 80% of users opt-out of tracking on iOS devices. It’s highly affected on apps whose main profit relies on advertising, such as Facebook, TikTok, and Snapchat. These companies started asking advertisers to implement server-side tracking to improve data quality.

We already have blog posts on setting up Facebook CAPI and TikTok Events API. In this blog post, I will talk about Snapchat Conversion API and how to set it up using the server Google Tag Manager container.

About Snapchat conversion API

 Snap Conversions API allows passing web, app, and offline events from your server to Snap servers. The official documentation says that Snap CAPI helps lower cost per action by improving conversion tracking and targeting.

Snapchat CAPI supports the same events and event parameters as web pixels. There are two main ways of implementing Snap CAPI: direct integration, which means sending server-side information from your servers directly into Snap’s servers, or partner integrations that include server Google Tag Manager (GTM). Let me first talk about Snap CAPI properties.

Snapchat event deduplication. Similar to Facebook and TikTok, Snapchat supports event deduplication, which means you can use both browser and server tracking. To remove redundant events, you should use event deduplication. The primary deduplication keys are Client_dedup_id (Which allows for a 48-hour deduplication window) and Transaction_id (Allows for a 30-day deduplication window). 

Cookies are still one of the most effective ways to track users. So till cookies are fully deprecated, most platforms, including Snap, recommend using web+server tracking. 

Snap tag for web Google Tag Manager does not support event_id, meaning that you should use a Custom HTML tag in web GTM to set up event deduplication. 

Snapchat CAPI events: CAPI supports all types of standard event names available for Snap web pixel. It also supports custom event names. 

Event parameters. Snapchat has detailed documentation that describes what event parameters CAPI supports. Click this link to check it. All user parameters (plain text email, mobile identifier, IP address, and phone number) should be normalized. After parameters are normalized, they should be hashed with lowercase hex SHA256 format. Stape Snap CAPI tag does all these transformations automatically. 

Server event testing. Though Snapchat has excellent functionality for testing pixel events using the pixel diagnostics page, unfortunately, for now, Spanchat does not have functionality for testing server events in real-time, similar to FB’s test ID.

The only way to check that Snap received and processed server data correctly is by checking via Conversion API data in the Snap events manager.

Benefits of Snapchat conversion API

Privacy. Server to server tracking, at its core, is a technology building with a privacy policy in mind. Unlike web pixel tracking, with s2s tracking, you can strictly control which data you send to each network. They will receive only data configured in server requests. 

Better ads optimization. CAPI helps collect more data about users, making Snap advertising algorithms more sufficient. In the official documentation, Snapchat says that implementing CAPI will help to improve cost per action. 

More quality audience. CAPI will improve remarketing and lookalike campaigns since it will send Snapchat more data about your users. The number of events should also increase. When users do not allow apps or sites to track users, CAPI can still be used to send events. 

Improved conversion tracking. Since server events can't be blocked in most cases, it will allow users to track all events generated by users.

How to set up Snapchat conversion API using server Google Tag Manager


2. Send data to the server GTM container. The two most popular sending data to sGTM are Google Analytics 4 and Data Tag/Data Client.

3. Download the Snapchat tag from GitHub or add it from sGTM template Gallery -> Open templates sections in the server Google Tag Manager container -> Click New.

4. If you decide to import tag, click three dots in the top right corner -> Click Import -> Select the Snapchat tag template you’ve recently downloaded from GitHub -> Click save.

snap capi tag sgtm

5. Create Snap tag in sGTM container -> Select event name. 

Standard - select one of the standard names.

Inherit from the client - in this case, the tag will try to parse sGTM event names and match them to Snap standard events. 

Custom - use a custom name. 

6. Add Snap Pixel ID -> Add Conversions API Token. To create Conversions API Tokens go to Business Settings and click Generate Token in the Conversions API Tokens section.

Conversions API Tokens Snapchat

7. Add user and events data. 

snap capi user data

8. If you want to use hybrid method (web+server) tracking for Snap, make sure you’ve added event ID to web and server Snap tags. For now, the web Snap tag does not support event_id, so use custom HTML to set up Snap web tags. 

snap capi event id

9. Open web and server GTM debugs and test that Snap tags are triggered correctly. 

snap conversion api

10. Unfortunately, Snap does not have a tool that helps troubleshoot server events in real-time. The only option to verify that Snap received server events is waiting till you see these events in Snap Events Manager. 

test snap capi conversion API

Conclusion

Snap official documentation says that implementing Conversion API will help to improve bidding and decrease cost per action. Though implementing is more complicated than FB or TikTok, it might help to improve the results of your paid campaigns. 

If you need help setting up server-side tracking for Snapchat Conversion API, don't hesitate to contact us. Our team of experts is more than happy to assist you in getting started. Thanks for reading!

Tagged with:sGTM tag

Try Stape for all things server-sideright now!