How to use the @uifabric/example-app-base/lib/index2.trackEvent function in @uifabric/example-app-base

To help you get started, we’ve selected a few @uifabric/example-app-base 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 OfficeDev / office-ui-fabric-react / apps / fabric-website / src / pages / HomePage / HomePage.base.tsx View on Github external
private _onInternalLinkClick = (ev: React.MouseEvent<{}> | React.KeyboardEvent<{}>, url: string): void => {
    trackEvent(EventNames.ClickedInternalLink, {
      topic: url, // @TODO: Remove topic when data is stale.
      currentArea: getSiteArea(),
      nextArea: getSiteArea(undefined, url),
      nextPage: url,
      currentPage: window.location.hash
    });
  };
github OfficeDev / office-ui-fabric-react / apps / fabric-website / src / components / Site / Site.tsx View on Github external
private _onTopNavLinkClick = (ev: React.MouseEvent) => {
    const { platform } = this.state;
    const { siteDefinition } = this.props;
    const target = ev.currentTarget as HTMLAnchorElement;
    trackEvent(EventNames.ClickedTopNavLink, {
      // Use the dom element's title or innerText as the topic.
      topic: target.title || target.innerText, // @TODO: Remove topic when data is stale.
      currentArea: getSiteArea(siteDefinition.pages),
      nextArea: getSiteArea(siteDefinition.pages, target.hash || target.href),
      nextPage: target.hash || target.href,
      currentPage: window.location.hash,
      platform: platform === 'default' ? 'None' : platform, // @TODO: Remove platform when data is stale.
      currentPlatform: platform === 'default' ? 'None' : platform // Pages that don't have a platform will say 'none'
    });
  };
github OfficeDev / office-ui-fabric-react / apps / fabric-website / src / components / Site / Site.tsx View on Github external
private _onLeftNavLinkClick = (ev: React.MouseEvent) => {
    const { platform } = this.state;
    const { siteDefinition } = this.props;
    const target = ev.currentTarget as HTMLAnchorElement;
    trackEvent(EventNames.ClickedLeftNavLink, {
      // Use the dom element's title or innerText as the topic.
      topic: target.title || target.innerText, // @TODO: Remove topic when data is stale.
      currentArea: getSiteArea(siteDefinition.pages),
      nextArea: getSiteArea(siteDefinition.pages, target.hash || target.href),
      nextPage: target.hash || target.href,
      currentPage: window.location.hash,
      platform: platform === 'default' ? 'None' : platform, // @TODO: Remove platform when data is stale.
      currentPlatform: platform === 'default' ? 'None' : platform // Pages that don't have a platform will say 'none'
    });
  };
github OfficeDev / office-ui-fabric-react / apps / fabric-website / src / components / Site / Site.tsx View on Github external
private _onLeftNavSearchBoxClick = (ev: React.MouseEvent) => {
    const { platform } = this.state;
    const { siteDefinition } = this.props;
    trackEvent(EventNames.ClickedSearchFilter, {
      // Use the dom element's title or innerText as the topic.
      topic: getSiteArea(siteDefinition.pages), // @TODO: Remove topic when data is stale.
      currentArea: getSiteArea(siteDefinition.pages),
      platform: platform === 'default' ? 'None' : platform, // @TODO: Remove platform when data is stale.
      currentPlatform: platform === 'default' ? 'None' : platform // Pages that don't have a platform will say 'none'
    });
  };