How to use the xdl.Analytics.logEvent function in xdl

To help you get started, we’ve selected a few xdl 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 expo / xde / src / ui / toolbar / ToolBar.js View on Github external
_onShowInFinderClick = () => {
    Analytics.logEvent('Click Show in Finder');

    FileSystem.openFolderAsync(this.props.projectRoot).catch(err => {
      console.error(err);
    });
  };
github expo / xde / src / ui / toolbar / ToolBar.js View on Github external
_onOpenInTerminalClick = () => {
    Analytics.logEvent('Click Open in Terminal');

    FileSystem.openConsoleAsync(this.props.projectRoot).catch(err => {
      console.error(err);
    });
  };
github expo / xde / src / ui / App.js View on Github external
_newClickedAsync = async () => {
    Analytics.logEvent('Click New');

    await this._stopProjectAsync(this.state.projectRoot);

    this.setState({
      openModal: ModalEnum.NEW_PROJECT,
    });
  };
github expo / xde / src / ui / MainScreen.js View on Github external
_openClickedAsync = async () => {
    Analytics.logEvent('Click Open');

    let root = await Commands.openExpAsync();
    if (root) {
      await this._startProjectAsync(root);
    }
  };
github expo / xde / src / ui / MainScreen.js View on Github external
_closeClickedAsync = async () => {
    Analytics.logEvent('Click Close');

    await this._stopProjectAsync(this.state.projectRoot);
  };
github expo / xde / src / ui / App.js View on Github external
_onTogglePopover = (popover) => {
    const isAlreadyOpen = this.state.openPopover === popover;
    this.setState({openPopover: isAlreadyOpen ? null : popover});

    if (!isAlreadyOpen) {
      Analytics.logEvent('Open Popover', {
        popover,
      });
    }
  };
github expo / xde / src / ui / MainScreen.js View on Github external
_newClickedAsync = async () => {
    Analytics.logEvent('Click New');

    this.setState({
      openModal: ModalEnum.NEW_PROJECT,
    });
  };
github expo / xde / src / ui / App.js View on Github external
_openClickedAsync = async () => {
    Analytics.logEvent('Click Open');

    await this._stopProjectAsync(this.state.projectRoot);

    let root = await Commands.openExpAsync();
    if (root) {
      await this._startProjectAsync(root);
    }
  };
github expo / xde / src / ui / MainScreen.js View on Github external
_restartClickedAsync = async (isShiftSelected = false) => {
    Analytics.logEvent('Click Restart');

    let clearCacheByDefault = await UserSettings.getAsync('clearCacheByDefault', true);
    let reset = clearCacheByDefault ? !isShiftSelected : isShiftSelected;

    let shiftMessage = '';
    if (!isShiftSelected) {
      shiftMessage = clearCacheByDefault
        ? ' (Hold shift while clicking restart to avoid clearing cache)'
        : ' (Hold shift while clicking restart to clear packager cache)';
    }

    this._logInfo(
      `Restarting project${reset ? ' and clearing packager cache' : ''}${shiftMessage}.`
    );
    this.setState(
      {
github expo / xde / src / ui / App.js View on Github external
_sendClickedAsync = async (sendTo) => {
    Analytics.logEvent('Click Send');

    this.setState({sendTo});
    let url_ = this.state.computedUrl;
    try {
      await Exp.sendAsync(sendTo, url_);
      this._logInfo(`Sent link ${url_} to ${sendTo}.`);
      UserSettings.updateAsync('sendTo', sendTo);
    } catch (err) {
      this._logError(`Could not send link to ${sendTo}: ${err}`);
      this._logError("If you're trying to SMS a link to a mobile device, make sure you are using the `+` sign and the country code at the beginning of the number.");
    }
  };