Skip to content

Conversation

@rossgrambo
Copy link
Member

@rossgrambo rossgrambo commented Oct 13, 2023

image

}

<div class="text-center">
<h1 class="display-4">Welcome <script>document.write(getCookie("username"));</script></h1>
Copy link
Member

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.

"Parameters": {
"Audience": {
"Users": [
"ross"
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

@jimmyca15
Copy link
Member

I believe you mentioned something about a specific usage of cookies being important with this publisher. Is that in this example?

@rossgrambo
Copy link
Member Author

rossgrambo commented Oct 20, 2023

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

@jimmyca15 jimmyca15 merged commit 445458d into preview Nov 15, 2023
@rossgrambo rossgrambo deleted the rossgrambo/telemetry-application-insights-example branch January 16, 2024 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants