@haifeng-fe/ubt
v0.2.4
Published
[more docs](https://via-ubt.now.sh/)
Downloads
3
Readme
via-ubt
How to use
With NPM
install:
yarn add @haifeng-fe/ubt
.import
import UBT from '@haifeng-fe/ubt'
.
With UMD
import by script tag:
<script src="//cdn.jsdelivr.net/npm/@haifeng-fe/ubt/dist/index.js></script>
use by window:
const UBT = window.UBT
Start
create project:
const project = new UBT('projectID')
create scene branch:
const UBTScene = project.createScene('scene branch id')
send basic data:
UBTScene.sendBasicAnalytics()
send custom data:
```js
UBTScene.sendEvent({
id: 'eventID',
message: 'hello',
params: {
},
})
```