I’m installing client + server side tracking for a client. I followed Vertex’s video on setting things up from about a year ago. Seems he has a partnership with Stape. In it, he uses Facebook’s Client Side GTM Template, which seems depreciated at this point.
Does Stape’s Facebook CAPI Template automatically send FBC and FBP on the server side? Seems like the Meta Facebook Pixel client side Template probably does not. I’m having trouble with Event Manager picking it up automatically on the client side, but I’m not seeing any way to send it explicitly using the client side Facebook template.
Or is there another preferred way to send client side FB events via GTM?
Does Stape’s Facebook CAPI Template automatically send FBC and FBP on the server side?
Yes, if the sGTM operates in a first party context, that is, if the sGTM uses a subdomain of the main domain where the events occur.
Seems like the Meta Facebook Pixel client side Template probably does not.
Most likely it’s just Meta event test lags, this happens quite often as well as dedulpication display issues. The most reliable method to check what data is actually sent from the client part is to look at it in the browser network.
Appreciate the response! Looks like the fbp is indeed being sent as part of the payload here. Like many things, I guess we’ll just have to assume it’s being received by FB. So it doesn’t matter if Tag Assistant doesn’t show fbp as being sent along with the other relevant parameters like Event ID, Pixel ID, advanced matching parameters, etc?
For client side FB event tracking, is the “Facebook Pixel” template from facebookarchive still the most practical to use? Looks like it hasn’t been updated in ~5 years. Or is there another fork from the community that marketers prefer these days?
So it doesn’t matter if Tag Assistant doesn’t show fbp as being sent along with the other relevant parameters like Event ID, Pixel ID, advanced matching parameters, etc?
Yes, it often glitches so in network you can see actually what data is being sent. This also applies to other helpers like FB, it is also worth checking the network if there is a strange problem somewhere.
For client side FB event tracking, is the “Facebook Pixel” template from facebookarchive still the most practical to use? Looks like it hasn’t been updated in ~5 years. Or is there another fork from the community that marketers prefer these days?
Thanks again for your time Alex! The Stape FB template seems super similar to the old version. May update in the future, but it doesn’t look like there’s any functionality I’m missing out on at the moment.
The main thing I was hoping for was the ability to map FBP and FBC directly from the client. I have a tracking situation where my client uses a third party for their checkout. I’m able to enable cross domain tracking via GA4 and install GTM (without the custom loader) on the checkout, but unfortunately a new FBP is generated once the user gets to the checkout page. The checkout page also seems to remove all URL queries besides _gl= and coupon= so I haven’t been able to pass the info along in that method.
My current objective is using Firebase and the Cookie ReStore tag to write the FBP and FBC in a database using _ga as an identifier, then overwriting FBP and FBC from the server side prior to sending any events to FB/GA4. For whatever reason, _ga retains the same value between domains (assumedly due to the cross domain url query).
Can you think of a simpler solution here? The checkout is able to read certain GA4 and FB cookies from both my home domain and the checkout domain as part of the first party cookie (with different domains), but it just means there’s a duplicate FBP in that case. I’d prefer not to have to use Firebase if possible, but it seems like that’s the only way I can transfer the cookie to the checkout domain unless there’s maybe some way I could read a different domain’s cookie.
Here’s a screenshot - .se is the home domain and .te is the checkout domain. You can see that _ga transfers but _fbp doesn’t.
After looking into this more, I’m not sure I would be able to overwrite the cookie on the checkout .te domain. My sGTM server domain is based on the first .se domain. Doesn’t look like the _fbp cookie is HttpOnly, so maybe the sGTM could overwrite it even for the second domain? Or overwrite it client side?
What you are describing is impossible to do, the cookie will be set new on another domain and you will not be able to hendle it correctly. Your sGTM does not set cookies on a third-party domain at all. Cookies set on your domain are not actually available on the third-party domain (you will not see them at all in Safari).
The only correct option here is to use checkout on your domain. If this is not possible - then return the user after successful payment to the thank you page on your domain where the events will work, this option is available usually on any third-party checkout.
I assumed that the cookie option wasn’t really possible. I’m just at a loss for how to make this work in context where I’m able to properly send events (mainly purchase events) with advanced matching parameters in this scenario.
If I send the purchase event when returning to the main domain from the third party checkout, then I still lose all Data Layer + Local Storage + client written cookie info. Would I need to use Firebase to catch that information then write to my main domain’s cookie from sGTM, then use that when firing the purchase event from my home domain after checkout is finished? Any other ideas?
Even if you build a mechanism when on a third-party domain you will send an event, from for example Stape Store take previously saved user’s cookies and form an event from it - you will not be able to fully use these events in Meta because you will not be able to verify the domain where these sales take place.
Alternatively, you may want to consider setting up tracking via webhooks:
But in this option you will also need to configure cookie saving as they are usually not available in the CMS/backend.