How to set up Conversions API for server-side Google Tag Manager
1

https://developers.facebook.com/docs/marketing-api/conversions-api/payload-helper

Please tell me what to enter in the em and ph fields Customization through GTM And then where to put the code on the site ? Or GTM Thank you

Женя
Asked about 2 months ago
Selected Answer
1

Hello Женя, First of all Ensure that you have Web Container and Server Container using the Tagging URL provided by the server setup.

Setting Up CAPI Tags in Server-Side GTM:

In your Server GTM container, create a new Tag and select Custom Template. Use the Facebook Conversions API Tag Template if available. Alternatively, you can use a HTTP Request Tag to send data to Facebook’s CAPI endpoint.

Customize the Data Layer for Events: _ In your Web GTM container, configure the Data Layer to push relevant event data (purchase, page views, add to cart, etc.). _ Ensure each event includes parameters like email (em) and phone number (ph) to be sent through CAPI.

Encode Customer Data: The em and ph fields require hashed versions of the customer data. if you are developer you use this code without developer you didn't push this code. Repeat this for the phone number field as well, hashing each value. function() { return CryptoJS.MD5({{Your Email Variable}}).toString(); }

it is very hard to write this solution if you need any help. feel free to contact me. facebook.com/nurumiah016

November 1 at 2:02 AM
MD Nuru