-
Notifications
You must be signed in to change notification settings - Fork 119
Adds example for Application Insights Publisher #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds example for Application Insights Publisher #284
Conversation
examples/EvaluationDataToApplicationInsights/appsettings.Development.json
Show resolved
Hide resolved
examples/EvaluationDataToApplicationInsights/Pages/Shared/_Layout.cshtml
Show resolved
Hide resolved
| } | ||
|
|
||
| <div class="text-center"> | ||
| <h1 class="display-4">Welcome <script>document.write(getCookie("username"));</script></h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this is a razor page, I'd recommend putting the username into the view data and using razor syntax to inject it into the DOM.
examples/EvaluationDataToApplicationInsights/Pages/Shared/_Layout.cshtml
Outdated
Show resolved
Hide resolved
| "Parameters": { | ||
| "Audience": { | ||
| "Users": [ | ||
| "ross" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the example, how do I pick the user name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, doesn't seem like having a hardcoded user already included may be desirable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editing the username cookie in the browser. Perhaps I should just exclude individual targeting from the example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, doesn't seem like having a hardcoded user already included may be desirable.
I wanted to see what happened for the not logged-in case. We could adjust it, but I think it's nice to show events flowing for guest users.
|
I believe you mentioned something about a specific usage of cookies being important with this publisher. Is that in this example? |
|
Here's my ReadMe snippet about the cookie magic. It's not a lot: https://github.com/microsoft/FeatureManagement-Dotnet/pull/284/files#diff-dc904d4dce5d3420435595d0fb7154a78d5cd82d78e02cc0e1d262266869af20R46 |
Uh oh!
There was an error while loading. Please reload this page.