Skip to content

Instantly share code, notes, and snippets.

@chrisobriensp
Last active August 16, 2017 21:35
Show Gist options
  • Select an option

  • Save chrisobriensp/aef90d410e3dc42805919295a2da1ee3 to your computer and use it in GitHub Desktop.

Select an option

Save chrisobriensp/aef90d410e3dc42805919295a2da1ee3 to your computer and use it in GitHub Desktop.
AppInsights.trackPageView(
document.title, /* (optional) page name */
window.location.pathname, /* (optional) page url if available */
{
userLogin: this.context.pageContext.user.loginName,
userDisplayName: this.context.pageContext.user.displayName,
isExternalGuest: this.context.pageContext.user.isExternalGuestUser
}, /* (optional) dimension dictionary */
{ }, /* (optional) metric dictionary */
0 /* page view duration in milliseconds */
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment