In this section, we'll learn how to install and use Oasis Language.
npm uninstall @masiv/analytics
IMPORTANT! Latest stable version: 1.0.0
Now, go ahead import, and install the library in the main.js file of your project /src folder as follows:
import OasisAddonAnalitycs, { OAS_CONST } from '@oasis/analytics';
Vue.use(OasisAddonAnalitycs,
{
dependency: OAS_CONST.dependency.MASIVAPP, // name your dependency
app: OAS_CONST.app.LOGIN,: // name your applications
});
Here we have the dictionary of dependencies and events already defined that you can use
OAS_CONST = {
dependency: {
MASIVAPP: "MV:MAPP",
OCEAN: "OC:OAPP",
TRUESENSE: "TR:TAPP" },
app: {
LOGIN: "LOGIN",
EMAIL: "EMAIL",
OAS_NAV: "OAS-NAV"
},
eventProperties: {
status: {
initialized: "Initialized",
canceled: "Canceled",
triggered: "Triggered",
completed: "Completed",
loaded: "loaded",
failed: "Failed",
validated: "Validated",
rejected: 'Rejected',
denied: 'Denied',
pending: "Pending",
resumed: "Resumed",
archived: "Archived",
},
type: {
userEvent: "user-event",
appEvent: "app-event",
apiRequest: "api-request",
errorEvent: "error-event",
notificationEvent: "notification-event",
trackingEvent: "tracking-event",
customEvent: "custom-event"
},
},
}
import { OasisAnalytic, OAS_CONST } from '@oasis/analytics';
OasisAnalytic.insertLogEvent('LOGIN_RESPONSE', {
status: OAS_CONST.eventProperties.status.completed,
type: OAS_CONST.eventProperties.type.appEvent,
payload: { // your payload }, // This field is not required
})
Your registered amplitude event would be as follows