Adsmurai-Google-Tag-Manager-Templates / adsmurai-facebook-conversions-api-client

This Google Tag Manager custom client handles requests for Facebook Conversions API and models them into an event ready to be processed by the custom tag "Adsmurai Facebook Conversions API Tag".
Apache License 2.0
14 stars 4 forks source link

CAPI purchase missing USD curency paremeter when firing #7

Open LogenP opened 10 months ago

LogenP commented 10 months ago

Seems to be a failure when trying to fire the purchase event

Payload: {"event_name":"Purchase (777322134164584)","pixel_id":"*******","access_token":"*********","data":[{"event_name":"Purchase","event_time":1699294779,"user_data":{"fbc":"fb.1.1697698245670.IwAR1R58F0R_2m3_EZ-8OzFmg57BS5DENRDg6Ekvgyj4HqXnlYTpEpapl37f8","fbp":"fb.1.1698887799092.241649850","client_ip_address":"***.**.**.**","client_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"},"custom_data":{},"event_source_url":"https://site.atticconstruction.com/one-time-offer?gtm_debug=1699294736102","event_id":"1699294779348","action_source":"website"}],"test_event_code":"TEST84031"}

Getting this response: {"error":{"message":"Invalid parameter","type":"OAuthException","code":100,"error_subcode":2804010,"is_transient":false,"error_user_title":"Missing Currency for Purchase Event","error_user_msg":"Your purchase event doesn\u2019t include a currency parameter. Enter a currency parameter. For example: USD","fbtrace_id":"A8164zosrh8h4b9nrcmpiOU"}}

angelbt91 commented 10 months ago

Could you confirm that you are sending such parameter to the server? You can see the request logs in the debugger.

LogenP commented 10 months ago

I'm using goHighLevel - I don't believe I can control what parameters i'm sending. Within the platform the item currency is USD though. Would it be beneficial to default it at USD if it's undefined?

mjadsmurai commented 10 months ago

@LogenP our clients are from all around the world. Setting a default currency would only help a few while breaking the rest :( Also, we act as brokers, we don't want to randomly fill the gaps, but just send what we are delivered :)

You or your agency should be able to properly setup the currency in GTM by filling the following field: Screenshot from 2023-11-08 08-12-10

Or by enabling the usage of ecommerce data, so the tag grabs all info from the data that you're already sending to Analytics:

Screenshot from 2023-11-08 08-14-04