First of all, you need to have all user data that you want to send using Facebook conversion API inside the Web container. If the dataLayer is configured for the Web container, you can use data layer variables. Or you can get it from CSS selector, URL parameters, etc. It depends on how your site is built and how web tracking works.
After you have all this data inside the Web container, you need to pass it to the Server container. You can use either Data Tag and Data Client or Universal Analytics or Google Analytics 4.
After you have all the Data inside the Server container, you can create variables inside the server container and add them to the Facebook conversion API tag.
Thanks so much for your reply Ira.
This is the problem:
There is no datalayer for facebook and i don’t know how to create.
Talking about CSS etc I think is not possible because are server things so I cannot push some code inside the google tag manager and create… or I don’t understand how to do this…
Can you tell me how to do it? I no idea… and not be able to find some good info to do.
I have this problem:
1 - if I do by my crm (active campaign) they don’t collect user_agent, if I do by gtm I can’t collect email, so I would need both, but is a mess…
2 - for another situation I use crm Kartra and convertri… same problem
Hi Ira,
I had that done on my site, the web container captures the user data and still I cant receive any user data over the server container.
Also can you please explain to me or make a screen shot for the configuration of the variable inside the .
Thx
thank you for the answer, in this moment I stuck to extrapolate the user dataLayer from facebook… I don’t understand how to do that… I was able to create dataLayer but only if I create a static one, not dynamic (I condigured also a dynamic data layer variable inside the gtm that works… but take the static variable that I wrote into the code of the page)…
I wrote into the page:
window.dataLayer.push({ ‘event_name’: ‘generate_lead’, ‘ip_override’: ‘ip’, ‘user_agent’: ‘user agent’ }); Just to make a test and I can read ip_override, but he read value: ip and NOT the real ip address and I don’t know why!
As Ira already mentioned, you need to configure DataLayer on the GTM Web container first.
This thing is very complex, and if you don’t have a plugin for your CMS and don’t know how to do this, the easiest way is to hire a person that can do this for you.
If you want to learn how to configure DataLayer by yourself, please follow this Google documentation on setting up a Web container.