ConversionsAPI-Client-for-GoogleTagManager
ConversionsAPI-Client-for-GoogleTagManager copied to clipboard
Connecting FB website tags to the server tag
One of the other FMP-TS agents pointed this out, and I've looked into it and am also unsure about how / where we can set the Transport URL on a Custom HTML (Facebook Pixel / Events) tag in GTM web container?
On UA / GA 4 configuration tags, the Transport URL is available under Advanced Settings. But Custom HTML tags do not have this option. I'm guessing we need to somehow code this into the tag's custom HTML itself, but not sure how / what that code would be.
GTM server-side documentation has an example specifying the Transport URL in the code for GA:
gtag('config', '<MEASUREMENT_ID>', {
transport_url: 'https://analytics.example.com'
});
Can we similarly specify the transport URL in the Pixel code?
Not sure if the devs have seen this, so just bumping it up as a reminder.
Been searching for possible solutions, but no one in the FMP-TS group seems to have an answers, and I haven't found anything concrete online either.
Hello @FDivecha !
Apologies for the delay –– Thanks so much for writing in. Currently this server container endpoint is added to config, inside Facebook's Event Manager portal as part of the pixel settings. So your pixel script when fired on a page knows exactly the container to send the corresponding events;
This experience is in private beta and please contact your FMP-TS to be added to the program.
Hi, thanks for the reply.
I am the FMP-TS,, and one of our clients is supposed to be on the beta. I'm just trying to get a jump on this so that we have a better understanding of what the solution will be.
Hello FDivecha,
(1) If you are already using Facebook Pixel on the page to send events to Facebook and are closed in Beta, sending your event to GTM server container is already enabled and events are sent at Pixel fire time. Hence you don't need to set the transport_url
at all.
(2) if you want to remove Facebook Pixel Tag from the page altogether and use GA4 Web Tag for all your measurement you could enable transport_url
as described here and use our Tag to collect the events on the Google Tag Manager serverside container to send it via Conversions API Tag to Facebook. We are working on public documentation for the above said mechanism and update it here.
If would like to try (2) for client early and included in the beta, would recommend you to contact Facebook PoC directly.