Description
This library should contain the code from ipfs/public-gateway-checker#309, in a way that can be consumed by the packages listed at #105
We should host this library at https://github.com/ipfs-shipyard/ignite-metrics and publish to npm as @ipfs-shipyard/ignite-metrics
A few requirements for this library:
Functional requirements
- Code is ESM.
- Export ESM.
- Can be consumed by CJS react libraries
- can be consumed by ESM react libraries
- can be consumed by CJS non-react libraries
- can be consumed by ESM non-react libraries
- For non-react libraries, the https://github.com/ipfs-shipyard/ignite-metrics/blob/ec17cc85748319d1dfe42003feea3a76eba209cf/src/CountlyMetrics.ts file will need to be enough for consumers to consume as they will not be able to consume the react components.
Inputs
- countly API key and url
- consent warning text/component
- consent acceptance text/component
Exports
- Warning component: https://github.com/ipfs/public-gateway-checker/blob/c727202d5a98b9e191a9d979fdb4e40e8d23cf43/src/index.html#L16-L25
- consent component: https://github.com/ipfs/public-gateway-checker/blob/master/src/index.html#L26-L35
- consent toggle component: https://github.com/ipfs/public-gateway-checker/blob/c727202d5a98b9e191a9d979fdb4e40e8d23cf43/src/index.html#L69-L84
- Countly instance/global (this could be something else in the future)