1.4.0 • Published 3 years ago
cmc-web-tracking v1.4.0
Installation
| Features | Parameter | Description |
|---|---|---|
| addTracking | tag (string) | Tag name |
| action (string) | User action | |
| initCall | pageName (string) | Your page's name |
| themeColor (string) | Color for webpage | |
| domainName (string) | Your webpage's domain |
How to use
- When the connection is successful, use the returned object to call your tracking functions.
- The addTracking function is used to add a new webpage to the backend's tracking list.
- The initCall function is used to initialize a call from your webpage.
Example Usage
import cmcWebTracking from "cmc-web-tracking";
cmcWebTracking
.init({
appId: "Your App Id",
})
.then((sdk) => {
sdk.addTracking({
tag: "home page",
action: "visit",
});
sdk.initCall({
domainName: "copengo.vn",
pageName: "counter",
themeColor: "green",
});
});