woocommerce/plugins/woocommerce-blocks/assets/js/base/utils
Rua Haszard 7921c3e5ba Record a tracks event when merchant toggles cart shipping calculator: (https://github.com/woocommerce/woocommerce-blocks/pull/1975)
* record a tracks event when merchant toggles cart shipping calculator:
- add tracks utility func for blocks
  - adds standard event name prefix
  - supplies post id & type params (an example)
- hook this up to UI when user toggles shipping calc
- pass enabled as boolean prop

* fix typo - call isTracksAvailable() !

* remove unnecessary temporary boolean

* update event name based on best practice guidelines

* remove isTracksAvailable preflight check:
- if site opts out, recordEvent is an empty function
- add in standard fallback boilerplate to ensure function exists
Note: currently no mechanism to detect if tracks is available on front end.
2020-03-26 10:12:34 +13:00
..
test More API price formatting and currency handling (https://github.com/woocommerce/woocommerce-blocks/pull/1394) 2019-12-18 11:29:20 +00:00
address.js Link shipping form fields to shipping rates to load them. (https://github.com/woocommerce/woocommerce-blocks/pull/1890) 2020-03-10 11:55:19 +01:00
errors.js Add withCategories and withAttributes HOCs (https://github.com/woocommerce/woocommerce-blocks/pull/935) 2019-09-04 18:07:00 +02:00
index.js Record a tracks event when merchant toggles cart shipping calculator: (https://github.com/woocommerce/woocommerce-blocks/pull/1975) 2020-03-26 10:12:34 +13:00
price.js Add loading placeholder for cart block (inital load) (https://github.com/woocommerce/woocommerce-blocks/pull/1819) 2020-02-26 15:49:07 +00:00
tracks.js Record a tracks event when merchant toggles cart shipping calculator: (https://github.com/woocommerce/woocommerce-blocks/pull/1975) 2020-03-26 10:12:34 +13:00