mitjans / nuxt-posthog

Posthog module for Nuxt
https://nuxt-posthog.cmitjans.dev
MIT License
27 stars 3 forks source link

Add support for listening to "auxclick" for directive #54

Open Dem1dov1van opened 5 days ago

Dem1dov1van commented 5 days ago

Hi! Is it possible to add listener on mouse wheel click for "v-posthog-capture"? For example: i can add @auxclick in vue to detect a "wheel click". But if i use a "v-posthog-capture" this event is ignored

mitjans commented 5 days ago

I like the idea of allowing events other than just 'click'. Would it work for you something like this?

<MyButton v-posthog-capture:auxclick="'my_event'" />

We can pass the name of the event as the argument to the directive (or use 'click' by default).