Facebook paid campaigns have been a go-to marketing channel for Shopify sellers, but in recent years achieving success with these adverts has become more complicated. With expanding tracking restrictions, it is more difficult to accurately target campaigns and track user acquisition costs - leaving businesses with less insight into their successes or failures than ever. However, with some creativity and new tracking technology, you can work around these issues for maximum benefit.
Facebook Conversion API is a relatively new way of tracking that helps advertisers measure and optimize their campaigns more accurately by sending server-side events directly to Facebook. It is handy in mitigating the impact of browser restrictions, such as ad-blockers or cookie policies, which may affect the accuracy of the Facebook Pixel. By combining client-side (Facebook Pixel) and server-side (Conversion API) events, advertisers can get a complete picture of their campaigns' performance.
Shopify users have several options on how to integrate Facebook conversion API. In this article, we will discuss all of them and show how to implement the Facebook conversion API for Shopify using the Stape Server GTM app.
Understanding which ads drive conversions is critical to optimizing your ad spend and improving the overall effectiveness of campaigns. The Facebook Conversion API allows for precise attribution by using server-side tracking to capture and convey data that might be missed due to ad blockers or other client-side factors. By accurately measuring and attributing conversion events, businesses can invest in the most effective ads and channels while continuously optimizing their campaigns for better results.
Facebook Conversion API for Shopify also improves security by reducing the potential for third-party data breaches or manipulation. Server-side tracking restricts data access to a limited set of authenticated servers, making it more difficult for malicious actors to gain access or manipulate data for their benefit. This improved security translates to higher trust between your business and its customers, increasing sales and customer loyalty.
By leveraging the capabilities of the Facebook Conversion API, and Shopify, you can make more informed decisions, optimize your marketing efforts, and drive revenue growth.
For those familiar with Zapier, it will be an easy way to integrate FB CAPI on Shopify. Though there are three main disadvantages:
- lack of customization
- the complexity of the deduplication setup
The setup is simple. You must select which action in Shopify should send the server event to Facebook. But there is no possibility of adding any custom events or tracking events like add to cart or product view. Besides, if you want to use a hybrid approach of FB pixel + FB CAPI as suggested in Meta documentation, sending the same event ID from the web and Zapier server will be hard.
This approach is also simple, but it usually comes with issues like low match quality score, not accurate event tracking. There are also some issues with consent management and cookie lifetime as well.
By using server-side Google Tag Manager along with Facebook Conversion API, your Shopify store can gain a more holistic view of user activity across multiple channels, leading to better ad performance, higher conversion rates, and lower acquisition costs.
All because setting up FB CAPI for Shopify using server Google Tag Manager allows customization, data enrichment, and setting up proper event deduplication. The following section will show how to set up FB CAPI for Shopify using the stape sGTM app.
3. Send data to the server Google Tag Manager container. There are three most popular ways to do that:
Here are some of the key benefits of using Data Tag/Data Client to send data from Web to Server container instead of using GA4 or UA:
We will look at sending data from a Web GTM container to a Server GTM container based on the Data Tag and Data Client using the add_to_cart event as an example.
1. In your Web Google Tag Manager go to the template gallery, find Data Tag, and add it to the Workspace.
2. To ensure e-commerce events, product, and user data are set up correctly, open a web GTM container and check the data layer the stape server GTM app sends for each e-commerce event. You might need to configure a data layer variable for an event or user data you must send to Facebook.
3. Go to Tags, and create a new Data Tag.
4. Inside the Data Tag in the Event Name, select standard and choose Add To Cart. Add your tagging server URL. Add event data (such as product name, value, ID, etc.) and User Data manually or select Send all from DataLayer. You can leave all the other settings unchanged. Add a trigger, in my case, a custom event add_to_cart.
5. Add Data Client inside the Google Tag Manager Server container. This Client will listen to Data Tag, process all information, and convert it into events data inside the server container. Open this link -> Click on the green button Code -> Download Zip file -> Go to the templates tag in the Google Tag Manager Server container -> On the Client Templates, click New -> Import -> Click Save.
6. Create a Data Client in the server GTM container. Select Clients, click New, and choose Data Client.
7. Open the preview mode of the web and server container and check that the server container sees Data Tag information. If you don’t see any events, ensure you’ve published the Server container and check that the Preview header is correct.
Now let me show you how to create a Facebook conversion API “Add To Cart” event with the help of Data Tag/Data Client.
1. Create variables inside the Server container that will capture the request_data you sent from the Web container. Go to the variables tab inside the Server container -> Create new variable -> Variable type event data -> Add Key Path.
2. Create a new Tag. Go to the community template gallery and add Facebook Conversion API Tag. In the Tag select override in Event Name Setup Method and choose AddToCart event. Fill in your FB API Access Token, FB Pixel ID, and Test ID to see events inside the FB testing tool. Add User Data and Custom Data that you wish to send to Facebook.
3. Add a trigger. Click on triggers-> + in the top right corner-> trigger settings and select a custom event trigger-> type add_to_cart to the event name, and this trigger will fire on Some Custom Events-> Client Name equals Data Client. Click save.
1. Open the web and server GTM containers debugger and click through your site. In the server GTM container, you should see requests claimed by Facebook conversion API Tag.
2. You can test this event inside the Facebook testing tool as well.
Overall, Shopify users have a variety of options when it comes to integrating Facebook’s conversion API. We’ve discussed each possibility thoroughly and explored how to deploy the Facebook conversion API for Shopify using the Stape Server Google Tag Manager app.
Shopify users should take the time to review their own business needs and use cases before determining which integration is best for them. Then, whether you choose a manual solution or rely on automation, implementing the Facebook conversion API will provide your company with additional insights into customer behaviors, help optimize campaigns, and deliver more engaging experiences for your customers.
To get started quickly and achieve the best results, we recommend trying the Stape Server GTM app for Shopify, which provides an easy-to-use implementation option.
We can help you with the setup! Click Get help, fill-up the form, and we will send you a quote.
Shopify allows changing “transportUrl” in GA settings. It means that you can set up a Google Tag Manager Server container on Shopify instead of a GTM Web container. I hope that this will help you solve all your tracking problems.Mar 10, 2023
Learn how to easily set up and manage server-side tagging for your Shopify store using the powerful features of the Stape Server GTM app.