Description:
I am setting up a webhook from a custom CMS to send offline purchase data to Meta (Facebook CAPI) and GA4 for proper conversion attribution.
Problem:
I need to determine which key should be used for the offline conversion webhook to correctly match purchases with the original session in Meta and GA4.
Context:
I plan to use transformation logic to extract necessary identifiers for event matching.
The offline purchase data should be linked back to the initial session, where parameters such as:
_gclid (Google Ads Click ID)
gaclientid (GA Client ID)
_fbp (Facebook Pixel ID)
_fbc (Facebook Click ID)
were stored in the state store.
Request:
What key should I use in the webhook payload to correctly retrieve these identifiers from the state store?
Is there a best practice for structuring the webhook payload to ensure a high match rate for offline conversions in Meta and GA4?
So I have an idea instead of storing _fbp and _fbc cookies on pageview I will store them for logged in user view item event and store it, then match it to purchase webhook key which will be logged in user I, users can purchase only when they are logged-in. Would that work?
And I have another issue, when debugging _fbc cookie gets these additional ‘+’ symbols, as it is very long. And it seems it is not written onto stape store. Any thoughts, is there limitation to variable length ar a way to fix it on client side gtm before sending it to server side?
What key should I use in the webhook payload to correctly retrieve these identifiers from the state store?
You can use any reliable key that is available both at web events (i.e. you can save cookies and it) and in your webhook. Often email is used, cookies are stored after it is accessed, for example on a checkout.
Is there a best practice for structuring the webhook payload to ensure a high match rate for offline conversions in Meta and GA4?
Best practice would be to specify all data manually in the tag and avoid autoparsing and the errors associated with it, so payload webhooks in general don’t matter much.
And I have another issue, when debugging _fbc cookie gets these additional ‘+’ symbols, as it is very long.
It’s just a UI display of a long string. This is the same way it is displayed in GTM preview.
And it seems it is not written onto stape store. Any thoughts, is there limitation to variable length ar a way to fix it on client side gtm before sending it to server side?
Stape Store has a single limit of 1MB per document. Cookie values are written without any problems, probably you don’t pass them or for some other reason they don’t get to the Stape Store.