Structured Event

Hi
I am looking for a way to track structured events like click, scroll etc without adding the attributes such as category, action, label to all the elements on a page and to all the pages for the website. Any suggestions?
Thanks

@mohitgpt24 you have auto click tracking and auto form tracking available in snow plow that you can turn on. scroll i haven’t seen. we are also looking at using data layers from GTM with snow plow. you can send those variables from GTM data layers into snow plow custom events or category/label/action but automatically.

What information do you want to capture with each click/scroll event?

As @mjensen has mentioned - link click tracking may fulfil some of your requirements but if you’d like custom data the best option is to develop a schema (self-describing JSON) for each event you would like to track.

@mike and @mjensen thanks for the response. I am looking to track the custom data without touching the html, basically removing the need to ask the developer to set the attributes. The reason is the maintainability because if the attributes are removed by mistake by some other developer then it would break the tracking.

What attributes are you looking to collect/set?

Definitely the category, action, label, purpose.

@mjensen where could I find the documentation about the auto click tracking?

@mohitgpt24
click: https://github.com/snowplow/snowplow/wiki/2-Specific-event-tracking-with-the-Javascript-tracker#enableLinkClickTracking
form: https://github.com/snowplow/snowplow/wiki/2-Specific-event-tracking-with-the-Javascript-tracker#enableFormTracking

we use both at my company and works well.

@mike i think he mostly wants something that collects stuff on it’s own since he has very little control of the website/code. @mohitgpt24 i would look into Google Tag Manager as well that could give you a little more control. just might have to work with developers to pass stuff to data layer from website but then you can send it to snowplow from there.

@mjensen what do you guys use for tracking buttons, dropdowns, and other html elements?
Also I am looking to avoid GTM.

Most people use a tag manager (like GTM) as it makes implementation significantly easier and decouples the logic from the codebase. It also means you don’t need to write any boilerplate code for tracking buttons/dropdowns/HTML elements as it’s possible to do all of this in GTM.

Why are you looking to avoid GTM/tag management?

we use auto click tracking for buttons and developers just make sure element classes have right labels when it comes back to snow plow. dropdowns are mostly covered in form tracking. and i agree with @mike , GTM is the way to go to give you more control if you can’t get at website code. you can create triiggers in GTM for clicks and forms for things that don’t work well in auto click and form tracking.

1 Like

@mjensen but as mentioned earlier, there is only auto click tracking of links and forms, then how are you tracking buttons? Secondly, to use the auto clicktracking for links, the schema is bit different i.e. it returns the properties(id, class, url etc), type , self which are not the default that snowplow provides.

@mohitgpt24 but buttons have an href no? link tracking should pick that up fine.
yes, link and form tracking have their own snow plow event schema tables.
honestly i rely on my developers for making sure data that goes into snow plow is correct and usable. i prefer having a custom event over auto any day, but auto is useful to cover all tracks.
again, GTM will help you as well. why can’t you use GTM?