Financial-Times / o-tracking

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

Turn the tracking class into a singleton object as tracking is only meant to be used as a singleton #279

Closed JakeChampion closed 4 years ago

JakeChampion commented 4 years ago

The Tracking class is only ever meant to be used as a singleton object, let's make the implementation enforce that it can only be used as a singleton and not have multiple tracking instances by mistake.

This should not change anything for users of o-tracking as the exported interface is the same.

origamiserviceuser commented 4 years ago

o-tracking bundle size difference from 2.0.10 to cc4efbe593f13436d5a22a5baac0760c34c34421 js: 4.59kb increase (1.45kb/gzip)

JakeChampion commented 4 years ago

@notlee Done 👍

notlee commented 4 years ago

double approved 👍

origamiserviceuser commented 4 years ago

o-tracking bundle size difference from 2.0.10 to 6c06ec1361a2909d4d34d95ca18a57c714fe35ce js: 4.59kb increase (1.45kb/gzip)