Configure the Snapchat Conversion API in Server Side GTM
For the Snapchat Conversion API to work, you must first configure a server container. Visit this blog to find out how to set this up.
In the first part of our Snapchat implementation series, we explained how to install the Snap Pixel via Google Tag Manager on the Client Side. Now that we are sending all the events Client Side with the Snap Pixel, we also want to send the events that are missed (due to browser blockers and ad-blockers) Server Side. This is possible with the Snapchat Conversion API (CAPI). But how do you configure this? We explain that in this blog.
Most companies are used to working with the Client Side Snap Pixel. In this blog, we will assume it is already installed. You'll learn how to install the Snapchat Conversion API here.
Steps Snapchat Server Side Tracking implementation
Curious about the entire Snapchat Server Side Tracking setup? Then check out this page.
Snapchat Conversion API setup
Setup Snapchat Conversion API in Google Tag Manager Server Container
Go to Server Container Google Tag Manager
Create new tag
Go to Tags and click on New.
Tag Configuration
Give the tag a name, such as Snapchat - Conversion API, and click Tag Configuration. Under Choose tag type, click Discover more tag types in the Community Template Gallery. In the gallery, search for Snapchat and select Snapchat Conversion API ServerSide.
Add Pixel ID to Tag
Under Pixel ID, add your Snap Pixel ID, which can be found in the Snapchat Business Manager.
Conversion access token Snapchat
Go to Snapchat Business Manager → Business Details and scroll to Conversions API Tokens. Click Generate Token to generate your API access token. Add this token under API Access Token.
Event Name
Choose whether you want to include all events you measure for GA4 (Configuration Tag + all GA4 event tags in the web container) or send a specific event. For the former, select inherit from client. For a specific event (e.g. purchase) use override client data and enter the name of the event you want to send to Pinterest. Note: In this case, you must also create a custom trigger for the specific event you want to send.
Setting Triggers
Once the tag is set, you choose the trigger: the time when the tag is fired. To forward all GA4 events to Snapchat, choose the GA4 client trigger. Don't have this trigger set up yet? Then check out this blog. Want to use a custom event? Go to Triggers, choose Custom Event and enter the name of the event you want to measure (make sure this is sent to the server container as a GA4 event). Save the trigger and add it to the Snapchat Conversion API. Click Save and the Snapchat Conversion API (CAPI) is set up.
Don't forget to put the container live!
You have now set up the Snapchat Conversion API in Google Tag Manager, nice going. The Snapchat events are now measured server side. The next step of the Snapchat server side implementation is to add Snapchat Event Deduplication. This is because currently Snapchat does not distinguish between events from the pixel and conversion api. These duplicate measurements can be distinguished by Event Deduplication. This is the final step in the Snapchat implementation series.