Track Event

analytics/track-event@1.0.0
Supported by 1 provider
M

Track Event

Allows to send event to tracking system

Input
Event Name
Event Properties
Result
string

1.Choose a provider

2.Use TrackEvent with mock in your code

npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the profile
  const profile = await sdk.getProfile('analytics/track-event@1.0.0');

  // Use the profile
  const result = await profile
    .getUseCase('TrackEvent')
    .perform({
      eventName: '',
      eventProperties: ''
    }, {
      provider: 'mock'
    });

  // Handle the result
  try {
    const data = result.unwrap();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

run();

Structure details

Input (object)

eventName
A string value representing event
eventProperties
Event Properties are attributes that help you define the specifics of an Event.

Example

{
  "eventName": "",
  "eventProperties": ""
}

Result (string)

Implementation details

Provider
mock
Use case
TrackEvent
Author
@superface
Source
Verified