Skip to content

Commit

Permalink
Task: Add telemetry for Report an Issue Link (#1011)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElinorW committed Jul 6, 2021
1 parent d0a1e41 commit 678e45e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/app/views/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function Settings(props: ISettingsProps) {
iconProps: {
iconName: 'ReportWarning',
},
onClick: () => trackReportAnIssueLinkClickEvent(),
},
{
key: 'divider',
Expand Down Expand Up @@ -145,6 +146,15 @@ function Settings(props: ISettingsProps) {
});
}

const trackReportAnIssueLinkClickEvent = () => {
telemetry.trackEvent(
eventTypes.LINK_CLICK_EVENT,
{
ComponentName: componentNames.REPORT_AN_ISSUE_LINK
});
}


const setPermissions = (permissions: []) => {
setSelectedPermissions(permissions);
};
Expand Down Expand Up @@ -274,3 +284,4 @@ function Settings(props: ISettingsProps) {
}

export default injectIntl(Settings);

1 change: 1 addition & 0 deletions src/telemetry/component-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const GRAPH_TOOLKIT_PLAYGROUND_LINK = 'Graph toolkit playground link';
export const MICROSOFT_APIS_TERMS_OF_USE_LINK = 'Microsoft APIs terms of use link';
export const MICROSOFT_PRIVACY_STATEMENT_LINK = 'Microsoft privacy statement link';
export const MICROSOFT_GRAPH_API_REFERENCE_DOCS_LINK = 'Microsoft graph API reference docs link';
export const REPORT_AN_ISSUE_LINK = 'Report an issue link';

// Actions
export const GET_SNIPPET_ACTION = 'Get snippet action';
Expand Down

0 comments on commit 678e45e

Please sign in to comment.