Join the Webstudio community

Updated 4 months ago

What is the best way to add onclick incline event tracking to Link Elements?

At a glance

The community member is using Gosquared instead of Google Analytics and is trying to add inline tracking to Link elements, similar to the example provided for a button. The comments suggest that there is no built-in way to add event listeners to links, except through an HTML embed. One community member suggests creating a global event listener and checking if the clicked element is a link, while another community member is unsure where to install the tracking in the settings tab. There is no explicitly marked answer in the provided information.

I'm using Gosquared in lieu of Google analytics and am trying to figure out how to add inline tracking to Link elements similar to the following:

<button onclick="_gs('event', 'Clicked like button')">Like</button>
O
t
B
5 comments
create a global event listener and check if it was a link
I'm not even to that point yet since I am not sure where to install it in the settings tab on the element itself. I know I could put in custom code through an HTML embed but I was trying to do it through the default elements.
Attachment
image.png
I am lost, what does graphql resource has to do with analytics tracking?
There is no builtin way to add event listeners except html embed.
understood. Thank you
Add a reply
Sign up and join the conversation on Discord