{"action":"closed","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/19919","repository_url":"https://api.github.com/repos/ampproject/amphtml","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/19919/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/19919/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/19919/events","html_url":"https://github.com/ampproject/amphtml/issues/19919","id":391796033,"node_id":"MDU6SXNzdWUzOTE3OTYwMzM=","number":19919,"title":"useBody attribute in AMP-ANALYTICS not working","user":{"login":"oliverfernandez","id":1696239,"node_id":"MDQ6VXNlcjE2OTYyMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/1696239?v=4","gravatar_id":"","url":"https://api.github.com/users/oliverfernandez","html_url":"https://github.com/oliverfernandez","followers_url":"https://api.github.com/users/oliverfernandez/followers","following_url":"https://api.github.com/users/oliverfernandez/following{/other_user}","gists_url":"https://api.github.com/users/oliverfernandez/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverfernandez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverfernandez/subscriptions","organizations_url":"https://api.github.com/users/oliverfernandez/orgs","repos_url":"https://api.github.com/users/oliverfernandez/repos","events_url":"https://api.github.com/users/oliverfernandez/events{/privacy}","received_events_url":"https://api.github.com/users/oliverfernandez/received_events","type":"User","site_admin":false},"labels":[{"id":284397641,"node_id":"MDU6TGFiZWwyODQzOTc2NDE=","url":"https://api.github.com/repos/ampproject/amphtml/labels/Category:%20Analytics","name":"Category: Analytics","color":"1d76db","default":false},{"id":530202281,"node_id":"MDU6TGFiZWw1MzAyMDIyODE=","url":"https://api.github.com/repos/ampproject/amphtml/labels/P2:%20Soon","name":"P2: Soon","color":"e99695","default":false},{"id":255304066,"node_id":"MDU6TGFiZWwyNTUzMDQwNjY=","url":"https://api.github.com/repos/ampproject/amphtml/labels/Type:%20Bug","name":"Type: Bug","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":{"login":"calebcordry","id":16087874,"node_id":"MDQ6VXNlcjE2MDg3ODc0","avatar_url":"https://avatars2.githubusercontent.com/u/16087874?v=4","gravatar_id":"","url":"https://api.github.com/users/calebcordry","html_url":"https://github.com/calebcordry","followers_url":"https://api.github.com/users/calebcordry/followers","following_url":"https://api.github.com/users/calebcordry/following{/other_user}","gists_url":"https://api.github.com/users/calebcordry/gists{/gist_id}","starred_url":"https://api.github.com/users/calebcordry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebcordry/subscriptions","organizations_url":"https://api.github.com/users/calebcordry/orgs","repos_url":"https://api.github.com/users/calebcordry/repos","events_url":"https://api.github.com/users/calebcordry/events{/privacy}","received_events_url":"https://api.github.com/users/calebcordry/received_events","type":"User","site_admin":false},"assignees":[{"login":"calebcordry","id":16087874,"node_id":"MDQ6VXNlcjE2MDg3ODc0","avatar_url":"https://avatars2.githubusercontent.com/u/16087874?v=4","gravatar_id":"","url":"https://api.github.com/users/calebcordry","html_url":"https://github.com/calebcordry","followers_url":"https://api.github.com/users/calebcordry/followers","following_url":"https://api.github.com/users/calebcordry/following{/other_user}","gists_url":"https://api.github.com/users/calebcordry/gists{/gist_id}","starred_url":"https://api.github.com/users/calebcordry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebcordry/subscriptions","organizations_url":"https://api.github.com/users/calebcordry/orgs","repos_url":"https://api.github.com/users/calebcordry/repos","events_url":"https://api.github.com/users/calebcordry/events{/privacy}","received_events_url":"https://api.github.com/users/calebcordry/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-12-17T16:40:49Z","updated_at":"2018-12-20T23:09:46Z","closed_at":"2018-12-20T23:09:46Z","author_association":"CONTRIBUTOR","body":"## What's the issue?\r\n\r\nI'm trying to use the new feature `useBody` from `AMP-ANALYTICS` to send data in the body of a `POST` request. However, I'm unable to make it work, as AMP keeps adding the payload as a query string.\r\n\r\n## How do we reproduce the issue?\r\n\r\nHere's an example of my `AMP-ANALYTICS` configuration\r\n\r\n````\r\n<amp-analytics>\r\n    <script type=\"application/json\">\r\n      {\r\n        \"requests\": {\r\n          \"marfeelAMPPageview\": \"https://cosmos.marfeel.com/varys/event\"\r\n        },\r\n        \"triggers\": {\r\n          \"trackMarfeelPageview\": {\r\n            \"on\": \"visible\",\r\n            \"request\": \"marfeelAMPPageview\",\r\n            \"transport\": {\r\n              \"beacon\": true,\r\n              \"image\": false,\r\n              \"xhrpost\": true,\r\n              \"useBody\": true\r\n            },\r\n\r\n            \"extraUrlParams\": {\r\n              \"ds\": \"marfeel_amp\",\r\n              \"cg1\": \"article\",\r\n              \"referrer\": \"${externalReferrer}\",\r\n              \"dh\": \"${canonicalHostname}\",\r\n              \"dl\": \"${canonicalUrl}\",\r\n              \"dp\": \"${canonicalPath}\",\r\n              \"ts\": \"${timestamp}\",\r\n              \"cid\": \"${clientId(mrf-client-id)}\",\r\n              \"buildNumber\": \"1234\",\r\n              \"customBuildNumber\": \"5678\",\r\n              \"mdt\": \"s\",\r\n              \"ua\": \"${userAgent}\",\r\n              \"type\": \"pageview\"\r\n            }\r\n          }\r\n        }\r\n      }\r\n    </script>\r\n  </amp-analytics>\r\n````\r\n\r\nAnd this is what I see in the Dev tools\r\n\r\n<img width=\"570\" alt=\"screenshot 2018-12-10 at 11 17 48\" src=\"https://user-images.githubusercontent.com/1696239/49726008-4b507900-fc6d-11e8-89e7-88f4483664cf.png\">\r\n"}}
{"actor":{"display_login":"calebcordry"}}