Skip to content

Commit

Permalink
Feature usage updates
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Dec 18, 2017
1 parent b5ae289 commit 567d3f2
Show file tree
Hide file tree
Showing 5 changed files with 215 additions and 192 deletions.
5 changes: 3 additions & 2 deletions src/common/appInsights/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import {Environment,EnvironmentType} from "@microsoft/sp-core-library";

AppInsights.downloadAndSetup({ instrumentationKey: "9f59b81e-d2ed-411e-a961-8bcf3f7f04d0" });

export function track(componentName: string): void {
export function track(componentName: string, properties: any = {}): void {
AppInsights.trackEvent(componentName, {
version,
debug: DEBUG ? "true" : "false",
environment: EnvironmentType[Environment.type]
environment: EnvironmentType[Environment.type],
...properties
});
}
Loading

0 comments on commit 567d3f2

Please sign in to comment.