Skip Navigation

[Resolved] Tracking clicks on pins toolset maps

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by timv-7 1 year, 11 months ago.

Author
Posts
#2525737
Capture 162.JPG

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?

What is the link to your site?
hidden link

#2526387

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

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.

#2530119

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.