Tell us what you are trying to do?
I am trying to track the clicks on the pins on our maps. When you click on the pins a popup is displayed, I would like to see how many people open the popup.
I tried to use Google Tag Manager to achieve this, but there is no element class to setup the trigger withing GTM. So I believe I need to add an element class to achieve this. Is there any documentation on how to track clicks on the pins with Google Analytics 4?
I'm not sure that this is possible. Digging down through the generated markup to identify how the markers are added, they don't appear to contain unique element ids, or element classes. It is not readily possible to add such ids or classes; Toolset uses the Google Maps API to add the markers to the Google map, and it is the API which generates the resulting markup for the markers.
It may be possible to use the Google API to assign some id or class to the element, but I don't know.
If you can create an online demo using the Google Maps API where the markers include ids or classes that suit your purposes, then we can investigate whether it is possible to translate that demo to achieve something similar by adding some custom code to the Toolset Maps using the same Google API options.
Thank you for your reply. I was hoping that there was some internal solution in Toolset. I don't feel comfortable enough to test with the API of Google, so I will have to leave this as is for now.