# Sending custom variables using the HTTP API

**URL:** <https://community.piwik.pro/t/sending-custom-variables-using-the-http-api/114>\
**Category:** Data collection and tags\
**Created:** [March 11, 2021, 1:37pm UTC](https://community.piwik.pro/t/sending-custom-variables-using-the-http-api/114 "2021-03-11T13:37:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbaersch](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/mbaersch/32/35_2.png) [@mbaersch](https://community.piwik.pro/u/mbaersch)\
**Post date:** [March 11, 2021, 1:37pm UTC](https://community.piwik.pro/t/sending-custom-variables-using-the-http-api/114/1 "2021-03-11T13:37:10Z")

</div>

While connecting my own data collection endpoint to PiwikPro via HTTP API I saw the examples at [https://developers.piwik.pro/en/latest/tracker/http\_api.html#/paths/~1ppms.php/get](https://developers.piwik.pro/en/latest/tracker/http_api.html#/paths/~1ppms.php/get) that show how to use the \_cvar and cvar parameters.

I am confused by the fact that the value should be a stringified JSON object but the examples use comma delimited lists like

```
1,AspectRatio,16:9,2,Height,1080,3,Width,1920

```

values sent in this strange format do not appear in the Tracker-Debugger. I tried the example and a mor simple one like `1,debugHttpApi,on` in some test hits but I had to change the format (as expected) to JSON. I used `{"1":["debugHttpApi","on"]}` or  
`%7B%221%22%3A%5B%22debugHttpApi%22%2C%22on%22%5D%7D` to be precise in order to to see something coming through.

Is this just a simple error in the documentation or am I missing something here?

---

<div class="post-metadata">

**Author:** ![piotr](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/piotr/32/1654_2.png) [@piotr](https://community.piwik.pro/u/piotr)\
**Post date:** [March 11, 2021, 4:40pm UTC](https://community.piwik.pro/t/sending-custom-variables-using-the-http-api/114/2 "2021-03-11T16:40:55Z")

</div>

Hey @mbaersch thanks for pointing this out. It’s an error in the documentation. The team is fixing it. I will let you know once this gets updated.

---

<div class="post-metadata">

**Author:** ![piotr](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/piotr/32/1654_2.png) [@piotr](https://community.piwik.pro/u/piotr)\
**Post date:** [March 12, 2021, 2:42pm UTC](https://community.piwik.pro/t/sending-custom-variables-using-the-http-api/114/3 "2021-03-12T14:42:25Z")

</div>

@mbaersch this has been updated. Thanks again for your contribution & have a great weekend.

PS. you might want to hard refresh if you still see the old version.

---

<div class="post-metadata">

**Author:** ![mbaersch](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/mbaersch/32/35_2.png) [@mbaersch](https://community.piwik.pro/u/mbaersch)\
**Post date:** [March 12, 2021, 9:40pm UTC](https://community.piwik.pro/t/sending-custom-variables-using-the-http-api/114/4 "2021-03-12T21:40:58Z")

</div>

wow, that was fast! 😉

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [March 13, 2021, 8:53pm UTC](https://community.piwik.pro/t/sending-custom-variables-using-the-http-api/114/5 "2021-03-13T20:53:19Z")

</div>

@mbaersch please remember that custom variables are deprecated and it’s recommended to use custom dimensions instead.
