# Custom event rejected when event action is empty

**URL:** <https://community.piwik.pro/t/custom-event-rejected-when-event-action-is-empty/1544>\
**Category:** Data collection and tags\
**Created:** [January 26, 2023, 9:58am UTC](https://community.piwik.pro/t/custom-event-rejected-when-event-action-is-empty/1544 "2023-01-26T09:58:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidkrogstrup](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/davidkrogstrup/32/1078_2.png) [@davidkrogstrup](https://community.piwik.pro/u/davidkrogstrup)\
**Post date:** [January 26, 2023, 9:58am UTC](https://community.piwik.pro/t/custom-event-rejected-when-event-action-is-empty/1544/1 "2023-01-26T09:58:05Z")

</div>

Via GTM in customHTML tag I am using this script to send a custom event to Piwik PRO:

```auto
<script>
  _paq.push(["trackEvent", "Document View", "{{DLV documentType}}", "{{DLV documentTitle}}"]);
</script>

```

Whenever the value of the variable “DLV documentType” is empty, the event does not show up in “Tracker debugger”. But as soon as the variable has a value, the event shows up correctly in “Tracker debugger”.

Does Piwik PRO reject a custom event, if event action or event name is set in the javascript with an empty value?

---

<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:** [January 26, 2023, 10:00am UTC](https://community.piwik.pro/t/custom-event-rejected-when-event-action-is-empty/1544/2 "2023-01-26T10:00:53Z")

</div>

Hi. Category and action are the only required parameters. [See the docs](https://developers.piwik.pro/en/latest/data_collection/web/guides.html#custom-events). My personal preference is to change it in the future to require only the event name, but we have to re-think how to make it backward compatible.

---

<div class="post-metadata">

**Author:** ![davidkrogstrup](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/davidkrogstrup/32/1078_2.png) [@davidkrogstrup](https://community.piwik.pro/u/davidkrogstrup)\
**Post date:** [January 26, 2023, 10:13am UTC](https://community.piwik.pro/t/custom-event-rejected-when-event-action-is-empty/1544/3 "2023-01-26T10:13:53Z")

</div>

Thanks for your answer 👌
