I had been having an issue with purchase overcounting and I recently reset my Google Tag Manager (GTM) and Stape Server setup for Shopify by following this guide:
Now, in the GTM Server-Side container, I can see all the event tags including Purchase are firing but the firing status is failed. Additionally, I cannot see the test event appearing in Facebook’s Event Manager.
What could cause a “Failed” firing status in GTM Server-Side?
Now I cannot even recreate the same situation I explained in the first message.
(I followed the steps explained in this page to apply fb-server.json and fb-web.json template. I completed the setup in the [Stape] _Settings folder)
The server side preview mode looks like this even if I did the test purchase. No add to cart/ initiate checkout/purchase tag not being fired…
When I tried setting up with fb-ga4-gads-server.json & fb-ga4-gads-web.json file explained in the stape page ( How to use pre-built GTM container templates for your Shopify store), the preview mode looks like this when I do test purchase:
In the picture, I don’t see begin_checkout, add_payment_info, and purchase event coming into server. Make sure these event is passing from web GTM to server GTM properly. Also check your datalayer if these event is being pushed into datalayer.
Sorry for the confusion. Now the situation has changed. I think I was able to setup Web Container to send data to Server Container for CAPI. But when I checked the Event manager, I only saw events from the Server coming in (none from the browser). Does this mean I need to do Pixel setup in the web container?
Facebook prefer to send data from both browser-side and server-side. That’s why you need to configure FB pixel tags and FB server tags in your web GTM so that FB receive data from both side (browser and server). Don’t worry FB deduplicate data automatically.
Stape’s template for FB CAPI is great. Just make sure the triggers and variables are configured based on the datalayer you are using. Then you are good to go.