stape-io / reddit-tag

Reddit tag for Google Tag Manager Server Side
https://stape.io/blog/reddit-conversion-api-tag-for-server-google-tag-manager
Apache License 2.0
1 stars 2 forks source link

BUG - events.event_at #5

Closed fresent closed 2 weeks ago

fresent commented 2 weeks ago

Format for reddit conversion api for field event_at is not correct.

Sample post request body to reddit api using GTM server side,

{"events":[{"event_type":{"tracking_type":"PageVisit"},"event_at":1724673905,"user":{"uuid":"633975ee-xxxx-4ee3-ae18-27cd277b737d","ip_address":"x.x.x.x","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"},"event_metadata":{"conversion_id":"1721857562782_17246745983821"}}],"test_mode":false}

Response code from Reddit : 400 Response Error message : {"message":"JSON error "unexpected type number" on field "events.event_at""}

Looking at Reddit's document at https://business.reddithelp.com/helpcenter/s/article/conversions-api-parameters It's clear, that reddit requires the field in format "event_at": "2021-11-30T18:21:47.585Z" and timestamp doesn't work.

Bukashk0zzz commented 2 weeks ago

Hi, Thanks for the issue. We added this to our backlog.

Bukashk0zzz commented 2 weeks ago

Fixed https://github.com/stape-io/reddit-tag/commit/41fee6a7a6b3e49466f93e13771baed9d5a6b069