Tracking clicks on any element

Hi @squaredindex,

Unfortunately, the tutorials are a section of the documentation that hasn’t been kept up to date or finished. We’re sorry for that and have plans to improve them.

The main documentation for the trackers is a better place to get help with instrumenting tracking. For example, here you can read about custom self-describing events and here is more information about tracking custom context entities with the events in the JS tracker.

To answer your question, the snowplow_name_here is in most cases just snowplow. So you would call window.snowplow(...) to interact with the tracker. It’s very unusual to change it to something else, the tutorial was being perhaps too careful.

How the events that you track would look like really depends on what you want to capture with the button presses. Custom context entities are not mandatory but help you reuse the same entities across different events. For example you can track a user entity with your events.

Please do ask specific questions that you need help with. One more resource for you to review is a tutorial for tracking self-describing events here on Discourse.

1 Like