add2cal / add-to-calendar-button

Reliably create beautiful Add to Calendar Buttons, where people can add events to their calendars. Without the hustle and unsupported cases.
https://add-to-calendar-button.com
Other
1.36k stars 114 forks source link

Feature request: choice click callback #645

Closed justin-hackin closed 1 month ago

justin-hackin commented 1 month ago

I want to be able to use Google Analytics to track choice clicks by the option name. I would like to see an option property onOptionClick of type (option: string)=>void | boolean where option is in the config options choices. If the function returns true, the default action will be omitted.

justin-hackin commented 1 month ago

Oh jeez, I just realized this project uses custom elements 😬 so this will probably never happen 🤷🏻‍♂️

jekuer commented 1 month ago

For GA, there is an even easier solution. We are already pushing this information to the DataLayer. See https://add-to-calendar-button.com/advanced-use#case-7

Will enhance in the future.