[2023] How To Set Up Facebook Conversion API w/ Google Tag Manager (Server-Side)
Vložit
- čas přidán 25. 07. 2024
- Top Method for Facebook Conversion API: Effortless Event Tracking with Google Tag Manager (Server-Side)
Discover the ultimate technique to effortlessly integrate Facebook's Conversion API with Google Tag Manager for optimized server-side event tracking. This reliable approach bypasses limitations posed by third-party tools like the Facebook Pixel, which can be hindered by iOS (Apple) restrictions.
Master the art of first-party data collection and utilize the Facebook Conversion API in tandem with Google Tag Manager for a superior alternative to browser-based event tracking, especially in a post-iOS 14 world. Enhance your website's performance by sending more events to Facebook, ensuring your marketing efforts don't miss a beat.
🆘 Need our help to set this up? Visit this page: tracking.vertexmarketingagenc...
▬ Content of this video ▬▬▬▬▬▬▬▬▬▬
0:00 Intro & tracking explanation
3:14 My Google Tag Manager setup
7:29 Make the tracking work for your site
19:45 Create your GTM server container & connect Stape
26:09 Setup the Facebook Conversion API Tag
33:00 Test/debug your setup
39:30 Proxy Google Tag Manager
42:34 Outro
🔗 Links & Resources:
Get my template & Stape server: content.vertexmarketingagency...
Create a dataLayer with GTM: • Send Customer Informat...
Google Tag Manager Tutorial (Understand The Basics): • Google Tag Manager Tut...
How To Troubleshoot Your Facebook CAPI: • How To Troubleshoot Yo...
🌎 Let's stay connected!
➡️ Join the community: coffeeandmarketing.org/
➡️ Our Website: vertexmarketingagency.com/
I have paid for a in depth course on CAPI with around 4 or 5 hours of content for a step by step installation. This is better
Thank you!
Big update: for everyone getting stuck at the GA4 Basic when adding the new subdomain server side tracking.. When you are at the GA4 Basic settings go to Configuration setting -> Add parameter - > type in "url" and something like "server_container_url" will pop up. Select it -> add in the value next to it your custom stape subdomain URL
Just spent the past couple of hours trying to figure this out - should have read the comments first 🤦
@@rogers2258 I feel ya! Took me some time too 😅
@@adelamincea great thanks a lot! What else did you enter in the Tag ID field?
Thank you soooo much, I felt so exhausted for this. Really appreciate your effort
successfully wasted 4 hours before watching this comment😫
Brilliant video! Thank you very much!
Top class
Very helpful video. Thank you.
easy and helpful
Thank you so much, man. you are a life saver
Happy to help
Thanks a lot
I am doing a course on FB ads. I watch all your videos. It gives me a lot of extra information.
Great to hear!
🔥🔥🔥 🚀
Thank you for the video
So when you set this up is it essentially the same thing as the lead attribution services like Hyros and Anytrack...?
Meaning that this'll help with retargeting and such
Great video, thanks a lot Cedric :) One question:
I had three separate B2B lead gen events (meeting booked, contact form, SaaS platform sign up) setup in GA4 before starting this server-side setup.
After finishing the setup with basic page-view standard events, I started working on the above and thought that since facebook ads only allows you to optimize lead gen campagns for one event, it would be cool if all three triggers for the B2B valuable actions were recognized as the same Lead standard event.
The thing is that I've seen all my previous GA4 events getting passed to the server now which means I should try to avoid sending duplicated events (3 previous GA4 B2B events + another GA4 event with all the 3 actions triggers to pass the info as the same event to the server) that result more hits to the server and getting charged more.
I don't want to lose GA4 separate B2B events for each of the three actions for reporting purposes, so how can I maintain those 3 separate GA4 events, but trigger one Facebook tag standard event conversion if those GA4 tags have custom names and not one of the equivalence Google Analytics ones that facebook recognizes as a standard?
Thanks a ton!
Hi Cedric - awesome video! Just want to check if this method still works with the new Google Tag? Or is there a workaround for this..
Thank you very much Cedric for this video! I have a problem with your template, I only got the welcome email from Stape, I checked the spam box too. There is a second email missing where I could download the template. Thank you!
First, thanks for your content, Cedric. I was able to set up my Conversion API because of your videos.
About Stape, just a warning for small businesses that want to use the free monthly quota of 10,000 requests:
In the first few months, they renewed my monthly quota. But now support told me that it would not renew and that my only way out would be to go to the paid plan.
So take that into account before embarking on the learning curve to set up Stape.
thanks
Hi Cedric,
Thanks. Very useful and in depth explanation. You should add the information that one has to add the "field... "transport_url...to his GA site tag more prominently as it won't work otherwise . See also comments below.
Hi @cesarmachetti685 do you care to explain on the "Field "transport_url"
@@PiwWee-jf2fr field... "transport_url = custom stape subdomain URL. see also comments below, e.g. from @adelamincea: "When you are at the GA4 Basic settings go to Configuration setting -> Add parameter - > type in "url" and something like "server_container_url" will pop up. Select it -> add in the value next to it your custom stape subdomain URL from."
Thanks for your great content. Your description is very clear an helpful. So I wonder how to create a GA4 event for the facebook standard Event SubmitApplication. I would be thankful for your help.
I believe that would be considered a custom event for GA4. To create custom events just make sure the 2 names are equal in both the FB and GA4 tag.
Great video! For the FB tags in GTM, do we need to select the LDU option to avoid compliance issues or does tracking server side avoid these anyway?
Thanks' a lot for this video. It has been super useful. I've just a problem with deduplication when I send user data (email, first name, last name, all hashed): if I DON'T send user data nor by pixel neither by server deduplication works. If I send user data through pixel a NOT through the server, deduplication works too. But if I send user data through server, regardless if I send them or not through pixel, deduplication stops working. It's a simple pageview event, but is making me crazy. Thank you if you can help!
Hi, thank you very much for the video. 1 question - what is the advantage of having pixel in browser GTM and server GTM? Why not to have FB tags only in server GTM?
Thanks. If I´m going to set up FB`s conversions API with GTM, is it neccesary to create a FB Pixel tag on GTM for tracking with the pixel? I mean instead of setting up the pixel directly on the website?
Quick question. I have same configuration as you. But what about facebook pixel. Is already added to website or only CAPI is added? How does it work? In events manager I can see I have current integration - pixel and capi. But I didn't added pixel to site. I did everything as you.
Hi, I've set it all up like you showed except when I preview it, its not triggering on the server side. I can see my ss. domain name in the bar facebook is receiving events but only browser events. I set it up to trigger on Client name equals GA4 like the video. It's all working web side but I'm not getting anything server side. Any help would be appreciated
Hi Cedric,
Thanks for your great video!
I have a question for you. A new Google tag sends page_view events with the same event_id which causes incorrect deduplication. How can it be fixed?
I installed the pixel via the Meta application on Shopify and set the Data Sharing Maximum? Why is it better to do the Facebook server-side installation with GTM? Super interesting content, thanks!
It seems we're now using GTM vs GTA4 now correct? So under GA4-Basic I should enter the GTM ID now and not the GA4 stream, correct?
hi there - thanks for sharing this. But how you can pass user data to the Purchase event ? one thing is passing info in the normal DL - but another thing is passing those in the Purchase event. thanks for any insight
Hi, first of all, thank you very much for the helpful tutorial! 🫶
I have 3 questions regarding this setup:
1. Have I understood the SS-GTM structure correctly that I just use ONE client (GA4) + Trigger, and then separate Tags in the SS Container for the various marketing platforms? = One Tag for CAPI, one Tag for GA4, one for G-Ads,.... ?
2. Is it possible to use custom event names (not limited to standard names like Pageview, AddToCart, etc.) in this setup, or am I restricted to the event names provided by Meta/Google?
3. I am not quite sure whether to set up the tagging server with Stape or Google Cloud Run. Could you advise on the level of website traffic required for Google Cloud Run to be more cost-effective than Stape?
Thank you very much!
nice helped out a ton. from the image it looks like there are only 9 GA4 tags that have a corresponding facebook event. what about custom events? how do you track those through ga4 and CAPI?
You can create custom events with no problem. Just make sure the event name that you use is the same for both GA4 and FB. So if the event name is download_ebook you’ll want to have that value in the FB and GA4 tag.
Any plans to get a 2024 updateds version? GA4 Configuration tags are no longer named that, and the ney "Google Tag" does not have a "Send event to server" field.
For a purchase, what is the eventID?! As in, what value is coming over from my store?
Hello I would like to know if I can do this on my web page, because mine is the game web H5
I understand that we are using browser tracking as well as server side tracking here for Facebook and deduplicating via the unique ID that they both share. I'm then stumbling at the bit where we push GA4 data. Are we doing this server-side only as the GA4 tag is only set to send data to the Server container. Or should I have duplicate web-based events in the web container that sends events directly to GA4 too which is also deduplicated?
Very helpful so far though - thank you.
I'm curious how to send the lead event through serverside also. All I am getting are the standard GA4 events, but my lead is triggered by a custom trigger from a datalayer - how does that get sent via server side as well? Thank you.
Hello Cedric, can i export my data from the conversion API to my Google BigQuery?
If we are using the more up-to-date Google Tag settings in GTM, do we need to set up a dedicated Data Stream in GA4 for this? I am seeing these events tracked in GA4.
Also, I am not seeing conversion events tracked in the FB event manager, I can see the event tracked by the pixel, but not server. Am I missing something?
Thanks
Do you have to send the unique eventId also with the other FB Pixel Tags like Purchase or just with the Main Facebook Pixel?
Thanks for the video, I have implemented this but i have an issue, the click ID, fbc seems to be returning undefined and this is affecting the event matching in Events Manager. Any help will be highly appreciated
Hi Cedric. I found your video in December '23. I got the link to the server but not the template. Is it anyway you could send the template again? Thanks.
If we already have Google Analytics 4 configuration installed before applying the template you provided, do we need to delete it?
Where in the template can we get the unique event ID?
How do I filter out GA4 events that I do not want to send to conversion API. As at the moment every event is sent to Facebook and GA4 both
Could you please make a detailed video like that one where you show how to send _fbc, _fbp, client_user_agent and all that juicy stuff using Adsmurai template? It is hard to grasp the concept of using Google Analytics to send data to Facebook CAPI.
hi... thanks for the video... great content... but one question... i already have 2 containers one for web and one for serverside tracking... do i have to set up a third container for the Capi? or just import yout template in my already exisiting serverside container?
Hi, may I know what you chose?
I tried to import the template but it said the file is incompatible.
At 9:09 you stated that {{Unique Event ID}} is something very important when it comes to deduplication. I would love to know how can I have that setup if I only use custom HTML to install the pixel base code and standard events?
Can someone share the gtm container which was mentioned here? I cant get an access to this container even I ve alredy registered
Will this apply for woOCommerce also?
Hello Cedric, at 30:59 you mentioned about the GA4 configuration tag, but i don't see it in my account, seems it is now called Google Tag. How to send GA4 data to stape under Google Tag?
Hello, I'm having the same problem. Did you find a solution?
same
Yeah, just like macmagx said. The user variables are not the same in the file. Also a ton of them aren't recognized by GTM so I can't update the container
Yes, you need to update them to make it work for your site or delete them.
heads up: only 2 user defined variables upload to GTM when you use your json file
"In early September 2023, Google retired the Google Analytics 4 configuration tag. It is now replaced by a new tag template called Google Tag. Together with this update, Google also introduced two new variables: Configuration Settings Variable and Event Settings Variable."
This seems to be a breaking change in this video.
Now in "G4 Basic" you have to add the configuration variable and call it "server_container_url" to point to the tagging server URL.
Can you elaborate liitle bit more ?
I'm stuck here !
@@ujjwaldahiya4548 you should just create "Configuration Settings Variable" - New Variable -
Google Tag: Configuration Settings - Add parameter - Parameter "name server_container_url" Value - yours server container URL - Save and use this Variable
@@ujjwaldahiya4548 Just go to configuration settings, and add new variable then add these parameters > server_container_url > *your server url* and send_page_view > true
In your Google Site tag simply add a field called "transport_url" and set the value as your server URL and you should be good!
How is it possible I can see the changes made on my part, or pay a freelancer to do everything, the CAPI of google tag manager and google analytics all the manual settings, he sends me photos of the work and I see that it is my pixel, but when I check it myself, there's nothing there. when he make call and share the screen and i see al the work he done. could be because i'm a mac user? and he have a windows ?
on testing my purchase is not getting dedupicated ,can you help me with this
Unfortunately it seems that the link to get the template it doesnt work anymore, when i insert my details it keeps load on infinite...
Hi,
Thanks for the fantastic video! I'm in turmoil and hope you can help me.
My GTM container already has a GA4 configuration tag with a measurement Id and a "purchase" event that sends data to GA4. My question is: Should I modify the existing GA4 configuration Tag and add the server URL or make a new GA4 configuration where I should add the stape server URL and a dummy measurement ID?
Because the end goal is to send the same event to FB conversion API. I learnt from the video that deduplication is essential, so I am asking this and also don't want to send additional info to GA4 like event_id and other fields under "Fields to set".
I appreciate any help you can provide.
I recommend you go all in with server-side tracking so convert your current GA4 setup so it sends data to your server container and from there send the data to both FB & GA4 via server. So in other words, you only need 1 GA4 configuration.
Hello Cedric, I wanted to express my gratitude for your tutorials. They were immensely helpful, and after working on it for three days, I was able to achieve the correct setup. However, there's still one question that I haven't been able to find an answer to. I followed your tutorial precisely to set everything up, but I've encountered an issue. The server container seems to be generating and transmitting two of the same kind of event (e.g. ATC) instead of just one as intended.
Upon inspecting the Events Manager, I noticed that there are two events being triggered by the Server for every single event. One of the ATC events has six parameters associated with it in the events manager: value, currency, content_type, contents, content_name, and content_category.
I'm wondering what might be causing this unexpected behavior. Could it potentially be related to the stape-io FB CAPI template? Just to clarify, I'm using Stape as the Server Side. Your insights would be highly appreciated, as getting an answer would greatly help me finalize the setup. Thank you so much once again!
It’s hard to say what’s causing this without doing a full audit but try changing your triggers and instead of making your tags fire “once per event” you could make them fire “once per page” and that should fix your issue.
Thanks for the video! When I imported the container I was missing the custom variables you reference in the video. Instead I had a facebook pixel template. It had some of the same stuff, but not exactly the same. Was this updated in your template?
Same here
same here
Same here.
Just updated the template :)
Not sure why you didn't remove the TEST EVENT from the facebook API tag when you were done with the setup.
Is it ok to leave it there? is it necessary?
Thank you for this great video!
Everything worked perfectly until next day when the server container suddenly isn't receiving anything more.
It worked with the new "server_container_url" and just stopped...after a few hours I received a request and then nothing again.
I have nooo idea what to do, so it will work immediately and every time. Has anyone an idea? 😥
Hello!
I have been trying to automatically send the city of the contact that fills out a form. Is there any code required to do this?
I know you need to have this parameter in gtm: user_data.address.city
but i don't know how to make it work
Can you help me?
Hi, thanks so much for your video. I followed the step and downloaded the template. However, when I imported it to my GTM, I couldn't see any triggers or variables.
Might be an issue with the way you're importing the template.
Thanks for your reply. I followed your steps exactly. Could you elaborate on it further? @@VertexMarketingAgency
I have this setup on 2 websites, seemingly the same way. For one website, the pixel is deduplicating the server events and processing the browser events. On the other, the pixel is deduplicating the browser events and processing the server events. Any idea what might cause this? I would prefer to process browser events and deduplicate server events in both instances.
Hey Great video! I have one quick question regarding Stape
So if I am managing advertising for multiple clients will I need create different Stape accounts where each client has their own Stape account that they each individually pay for and I just gain like shared access to that account in order to start implementing the tracking?
or do I just create like a sub account in my own Stape account and every client is under one kind of "agency" account?
Hope my question makes sense!
I recommend that they all get their own stape account and they can add you as a user :)
Hey mate, thanks for the tutorial. Would like to clarify if this would work if my website is built with Squarespace but has GTM installed? Thanks!
If you can install GTM on your site, yes it will work :)
@@VertexMarketingAgency Thank you so much for this insight!!
How to fire lead event?
I didn't understand what to put in the - {{Order Total **Update After Import**}} for facebook. how do I get this info?
31:05 option is now disabled in Google. Can't find it and I'm lost.
Hi Cedric, thanks for this video. However, one question regarding to the "unique event ID" - you metioned it is coming by default. I do not have it. Where can I get it from? Thanks for your feedback!
It should be in the template I shared if not try looking for it under variable template in GTM
GA4 Configurations has change to tags how to do that bit ad a parameter and put server_container_url then stape sub domain ?
Instead use the field transport_url
Before you start using the template you have to change the unique id variable to the new version!!!
Hi,
Thanks a lot for the video! I am stuck with a lead event. It worked for a few times but now it doesn't. The event does not get sent anymore to the server container. Do you have any idea what it could be?
Hard to say what it is without auditing your setup.
The json download does not match the video. All of the FB tags have 12345 hard coded instead of using a variable. In your video you have 9 custom variables. When I imported the template it only added 2: "EventID" and "timestamp in seconds". I'm guessing you have changed the download since you made this video or you didn't update the json for this vide. I do notice that my download says ver 2 and is dated 2021-10-28 Do you have a video that matches this download or a download that matches this video?
I was able to add 2 new variables and modify the json and put {{Facebook Pixel ID}} and {{GA4 ID}} in place of "12345" and "GA123"
Hi Cedric
Thank you for this video, it's informative and helpful
I used my own GA4 measurement id which was set up earlier on the site to set up the conversion API but as soon as I followed the process the conversion api was successfully set up for page view event but Google analytics stopped recieving any data.
Is there any solution for this?
It probably has to do with your GA4 tag in the server container. I think it’s missing.
Thanks for the reply 👍👍 what I did instead is created 2 GA4 tags in my browser container one dummy and one original and used the dummy one for server url
Hi Cedric, Thanks for the video.
I can't import the json file and it says the file is incompatible. Do you have the updated version of the file?
Did you download it as a JSON file?
I'm the only one who doesn't have "Send to server container" checkbox and "server URL" field?
I saw this everywhere, but I can't make it show up on my GTM. Not even after uploading your template. Do you have any advice?
GA4 Configuration tag was removed a few months ago. GA4 event tag doesn't have that.
Having same issues - No option to "send to server container".. What am I missing?
Anyone have the facebook event manager issue:
"Send IPv6 for PageView events. Change IPv4 addresses for PageView events to IPv6 and send them to Conversions API to get additional conversions reported"
Same issue comes up for all lead events etc. Wonder if anyone knows exactly how to change IPv4 events to IPv6??
Where to get the event ID?
Can you help me locate your video regarding setup for customer information data parameters?
Here: Send Customer Information To Facebook (w/Data Layer)
czcams.com/video/VBUMiAoPv4Q/video.html
Hey there. I get the following message Containeren for import is not compatible with the actual container. Not sure if I did anything wrong on my end. I hope you can help..
It’s probably because you didn’t download the file as a .JSON or you’re importing the template in the server container and not web container.
Thanks for the video :)
When I filled the form, I received an email with a link to 2 files about TikTok not Facebook
Could you please send me the good link?
thanks a lot
Thanks for mentioning this. Please try again :)
Hey mate, the tutorial does not work anymore. YOu can only upload the file for a web based container, in which you do not have the "send to server" option.
Google made some changes to the GA4 basic tag. It still works you just need to change it to a Google Tag
can you explain how to change it so we can input the server?@@VertexMarketingAgency
I second this request. There is not 'Send to Server' option@@VertexMarketingAgency
Great video though. I saw you sending events to the server container. If the events e.g. the page_view doesn't show in the debug view in Google Analytics, does it still work? I managed to get it done the same way you present it in your video but I cannot see the server events comming through. The Analytics tag fires on the server but no event showing in the debug view. If install a Analytics Browser Tag then it works. Am I missing anything here? Can you give me any advice about this?
Sometimes the debug view doesn’t always work. The best way to know if it’s working is to see if you’re receiving data.
@@VertexMarketingAgency can you recommend an easy way how to see if I receive the data
I followed all the steps and everything seems to work except the deduplication part. Sometimes the event is detected and deduplicated and sometimes not. I don't understand what is the problem and doublechecked everything already so many times :(
@VertexMarketingAgency I am at 31:09 'Server Container URL'... This option no longer exist as the tag is now just 'Google Tag' and not a GA4 configuration tag. Where do we add the server URL?
This solution worked for me developers.google.com/tag-platform/tag-manager/server-side/send-data?option=GTM and following instructions for (1.)
I cant acces the template
You can only use Stape if you have VAT ID. Otherwise you cant use their services. It won’t allow you to create an Billing account
Is it possible to set up server side tracking for a booking calendar in a website ?
Yes, totally!
Adding the cname record with this new setup won't crash my website?
I ask because in your 2022 video with using the google server setup, you instruct not to add the cname record.
Also please provide the link for buying you a virtual cup of coffee.👍
Ahah yes, good memory! Adding the CNAME is fine here and it’s recommended.
Is it a good idea or unnecessary redundancy to also place the pixel code on a webpage/website even after setting up the Conversion API with GTM for browser and server-side tracking?
It’s still best practice to have both.
@@VertexMarketingAgency to be clear, you're referring to also placing the pixel code onto a web page even though GTM is setup for tracking?
Thank you very much, everything's working fine but I've just got one tiny problem: I've got a "scroll" event being sent via the server every time in addition to the "pageview". I can't figure out where this is coming from?
It’s a native GA4 event. Just ignore it or you can also block it in your server container.
@@VertexMarketingAgency Okay thanks, and how can I block it ?
@@Adrian-jt5gw Were you able to block some events? I am facing the same issue
file dosent download 😢😢😢
How does one save as a JSON file? I can open in google docs but how to save???
It has to do with the way you’re downloading it to your computer.
Hey great video, Cedric, I am facing one problem. I have set up an event only for GA4 in web container and did not set it for Facebook pixel. But I am seeing that event in Facebook also. Events like scrolls are also showing in Facebook where it solely was created for GA4 but not for Facebook with FB pixel. What can be the problem and what's the solution? Please help.
You probably need to change your trigger inside the server container (the one attached to your FB CAPI tag).
@@VertexMarketingAgency But the Facebook CAPI has the custom trigger which is GA4 client only, the one you used in your video, so what should I put in the trigger? Sorry if I failed to understand. And thanks for the reply.
@@ChowdhuryMdImamMahadi Were you able to fix the issue? I am facing the same
@@MrKuber1997 no, not until now. Its very annoying that why these extra data is showing in Facebook as well. I created a button trigger using GA4 event and it was only required for GA4 and not for Facebook pixel, but this button click tag event was also shown in Facebook. I did everything as Cedric showed. But this has happened. The trigger that Facebook CAPI has as mentioned by Cedric is as same as Cedric's video. He didn't also say anything about what to be done! Been waiting for long now. Also seeing page scrolls in Facebook which was a simple auto event for GTM and no tags were created with scrolls with Facebook pixel or GA4 😅. What about you? Can you explain your issues?
can i use my server in Hosinger?
Maybe but it would be a lot more complicated to setup
The "Send to server container" is not showing anymore, do you have any alternative to that?
hello, if you find the solution, please share here. =D
how to do that on new google tag?@@simplysoup5432
I am having this pixel code error. Where can I find how to remove this extra event from my pixel? currently using GTM server container with FB CAPI both through Stape after watching this video and using the JSON template. This is the mysterious event ID showing up as extra pageviews that are not de duplicating. Please help me remove this or understand where it's coming from. Event ID: ob3_plugin-set_e6c96308cc32e8c84e3a139088fa9359bb3807fcc7b12ee0a81da31c21cc1e55
Sorry but I’m not sure I understand your question. Is it showing as an event or variable?
Hello there, I installed your container and i found that the {{FBC}} and the {{FBP}} variables are missing. Would you be so kind and tell how do you get them? With js or from dataLayer? With js like this? fbq('track', 'PageView', {'fbc': {{FBC Cookie}}} , {'eventID': {{Event ID}}} );
I updated the template. It should be good now :)
yeh dont work for me only page views fires which is odd
Does this process help FB accounts optimise for more accurate customer targeting, for higher conversions ??
Yes, that’s correct :)
When I turn on ad-blockers, I see my server event going through to Meta as expected. But for some reason 100% of these events say "de-duplicated" even though there is no cookie event. Why are ALL my server events marked as de-duplicated?
Are you sending the event id and doing both browser and server tracking?
@@VertexMarketingAgency I am. This only happens when I turn on ad-blocking. It's like the browser knows to send a kill signal using the event ID via ad blocking or something.