Skip to content

v3.0.0 - New `tracking` prop

Compare
Choose a tag to compare
@tizmagik tizmagik released this 08 May 19:55

New Feature

In #31 we now expose a single tracking prop that looks like:

{
  // tracking prop provided by @track()
  tracking: PropTypes.shape({
    // function to call to dispatch tracking events
    trackEvent: PropTypes.func,

    // function to call to grab contextual tracking data
    getTrackingData: PropTypes.func,
  })
}

This is so that you can grab the contextual tracking data if you need it by calling props.tracking.getTrackingData(). The previous props.trackEvent() is now props.tracking.trackEvent().

Breaking Changes

props.trackEvent() is now props.tracking.trackEvent()