# How to trigger custom even manually

**URL:** <https://community.piwik.pro/t/how-to-trigger-custom-even-manually/4529>\
**Category:** Data collection and tags\
**Created:** [October 11, 2024, 10:29pm UTC](https://community.piwik.pro/t/how-to-trigger-custom-even-manually/4529 "2024-10-11T22:29:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcubic](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/jcubic/32/3805_2.png) [@jcubic](https://community.piwik.pro/u/jcubic)\
**Post date:** [October 11, 2024, 10:29pm UTC](https://community.piwik.pro/t/how-to-trigger-custom-even-manually/4529/1 "2024-10-11T22:29:35Z")

</div>

I have React application and I need to trigger the even in specific scenario. This is not a form submission, scroll event, or button click.

How can I do this from JavaScript?

---

<div class="post-metadata">

**Author:** ![jcubic](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/jcubic/32/3805_2.png) [@jcubic](https://community.piwik.pro/u/jcubic)\
**Post date:** [October 12, 2024, 9:26pm UTC](https://community.piwik.pro/t/how-to-trigger-custom-even-manually/4529/2 "2024-10-12T21:26:37Z")

</div>

You need to put your Tag manager tracking code, I have no idea where to get it. I got it in wierd modal dialog on my website where I included Piwik Pro analytics code. After adding Tag manager code that is nowhere to be found on Piwik Pro website the modal is gone, but I can do this:

```javascript
_paq.push(['trackEvent', 'REPL', 'command', command]);

```

---

<div class="post-metadata">

**Author:** ![Adam](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/adam/32/1494_2.png) [@Adam](https://community.piwik.pro/u/Adam)\
**Post date:** [October 14, 2024, 10:28am UTC](https://community.piwik.pro/t/how-to-trigger-custom-even-manually/4529/3 "2024-10-14T10:28:32Z")

</div>

Hi @jcubic,

As I mentioned in your previous thread, [installing our tracking container](https://help.piwik.pro/support/getting-started/install-a-tracking-code/) provides you with access to all of our modules. Additionally, if your website is built with React, you can use [our React library](https://developers.piwik.pro/en/latest/data_collection/web/frameworks/Piwik_PRO_Library_for_React.html?highlight=react)
