stape-io / facebook-tag

Facebook tag for Google Tag Manager Server Side
https://stape.io/how-to-set-up-facebook-conversion-api/
Apache License 2.0
37 stars 20 forks source link

eventData._fbc & eventData._fbp #22

Closed Kixell-NicolasJardillier closed 1 year ago

Kixell-NicolasJardillier commented 1 year ago

Hi,

is this code wrong ?

if (!fbc) fbc = eventData._fbc;
if (!fbp) fbp = eventData._fbp;

In fact it is not possible to set fields with a name starting with an underscore in the tag GA4 of the GTM Web

Best regards

Bukashk0zzz commented 1 year ago

Hi,

It is not wrong. This is for use cases when you send events from not GA4, for example, thru webhook. If you use GA4 tag/client _fbp and _fbc cookies will be send to server automatically.

Kixell-NicolasJardillier commented 1 year ago

Hi, but the code mentioned is related to Event Data not the cookie. Code related to the cookie is above in the code

Bukashk0zzz commented 1 year ago

Exactly. Code lines 34 and 35 for cases when you send data from server to server integration, and there will be no cookies.

What issue do you have, and what are you trying to achieve?

Kixell-NicolasJardillier commented 1 year ago

I understand, it is clear for me now