How to use the appcenter-analytics.trackEvent function in appcenter-analytics

To help you get started, we’ve selected a few appcenter-analytics examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lomocoin / lomo-rn-boilerplate / src / utils / Analytics.ts View on Github external
) {
    const meta = {
      device: `${DeviceInfo.getModel()}-${DeviceInfo.getSystemVersion()}`,
      ...extra,
    };
    const data = {
      [`${functionName}_error`]: `${JSON.stringify(
        meta,
      )}-${this.serializeObject(error)}`,
    };

    if (__DEV__) {
      // tslint:disable-next-line
      console.log(`${moduleName}_${pageName}_${functionName}_error:`, error);
    }
    Analytics.trackEvent(`${moduleName}_${pageName}`, data);
  }
}
github NordicMuseum / Nordic-Museum-Audio-Guide / v2 / src / actions / localization.js View on Github external
return async dispatch => {
    const locale = setI18nConfig(desiredLocale);
    Analytics.trackEvent(`LocaleChanged: ${locale}`);

    // Always restart app on locale change, it's easier this way
    dispatch(restartApp(locale));
  };
}
github textileio / photos / App / Redux / EventLogging.js View on Github external
) {
    let payload = { deviceId }
    const additionalPayload = actionToPayload(action)
    if (additionalPayload) {
      payload = {...payload, ...additionalPayload}
    }
    Analytics.trackEvent(action.type, payload)
    return next(action)
  }

  const currentScreen = getCurrentRouteName(getState().nav)
  const result = next(action)
  const nextScreen = getCurrentRouteName(getState().nav)
  if (nextScreen !== currentScreen) {
    try {
      Analytics.trackEvent(action.type, { currentScreen, nextScreen, deviceId })
      // Example: Analytics.trackEvent('user_navigation', {currentScreen, nextScreen})
    } catch (error) {
      Analytics.trackEvent('error', { error, deviceId })
    }
  }
  return result
}
github BlueWallet / BlueWallet / analytics.js View on Github external
let A = async event => {
  amplitude.getInstance().logEvent(event, {});
  try {
    Analytics.trackEvent(event);
  } catch (err) {
    console.log(err);
  }
};
github microsoft / appcenter-sdk-react-native / TestApp / app / screens / AnalyticsScreen.js View on Github external
action: () => {
                    const eventName = 'EventWithLongProperties';
                    Analytics.trackEvent(eventName, { propertyValueTooLong: '12345678901234567890123456789012345678901234567890123456789012345' });
                    console.log(`Scheduled event '${eventName}'.`);
                  }
                },
github microsoft / appcenter-sdk-react-native / TestApp / app / screens / AnalyticsScreen.js View on Github external
action: () => {
                    const eventName = 'EventWithoutProperties';
                    Analytics.trackEvent(eventName);
                    console.log(`Scheduled event '${eventName}'.`);
                  }
                },
github microsoft / appcenter-sdk-react-native / TestApp / AnalyticsScreen.js View on Github external
           Analytics.trackEvent('Button press', { page: 'Home page' })}>
github microsoft / appcenter-sampleapp-react-native / src / screens / analyticsScreen.tsx View on Github external
onPress: () => {
                  Analytics.trackEvent("Sample event", {});
                  Alert.alert(null, "Event sent", [{ text: "Ok" }], { cancelable: false });
                }
              },
github microsoft / appcenter-sdk-react-native / DemoApp / app / screens / AnalyticsScreen.js View on Github external
action: () => {
                    const eventName = 'EventWithProperties';
                    Analytics.trackEvent(eventName, { property1: '100', property2: '200' });
                    showEventToast(eventName);
                  }
                },

appcenter-analytics

React Native plugin for AppCenter Analytics

MIT
Latest version published 3 months ago

Package Health Score

76 / 100
Full package analysis