I have a dashboard that needs Google Tag Manager functionality. The site is here: https://demography.dola.colorado.gov/community-profiles/
The user has to select a data level, a specific location, and select a set of topic areas, then they click on a "view Profile" button to generate the selected profile. .
When the user clicks on the "View Profile" button I want to write the values of the selected data level, location and the selected topics to the dataLayer.
What is the recommended way to do this?
Can I write a JS function that is triggered by the onClick method of the actionButton command?
Should I use an onclick() function in the server portion of the Shiny code?
I'd appreciate any suggestions.