Financial-Times / o-tracking

Origami Tracking component
http://registry.origami.ft.com/components/o-tracking
6 stars 8 forks source link

Improve support for multiple calls to `oTracking.click.init`. #324

Closed notlee closed 3 years ago

notlee commented 3 years ago

This will allow projects to track clicks on elements which are not tracked with the default oTracking.click.init call, and allow projects to track clicks with different event categories.

For example to track non-interactive elements with the custom data attribute data-my-element-to-track-clicks-on.

oTracking.click.init(
    'my-custom-category',
    '[data-my-element-to-track-clicks-on]'
);
origamiserviceuser commented 3 years ago

o-tracking bundle size difference from 3.0.0 to 87800bd8d64fc7346a80fe67b8d122d71cde0c6b No significant bundle size differences found.

origamiserviceuser commented 3 years ago

:tada: This PR is included in version v3.0.1 :tada: