Skip to content
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

Add Browser UserAction Event #1941

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Karlie-777
Copy link

Fixes #

Changes

Please provide a brief description of the changes here.

Note: if the PR is touching an area that is not listed in the existing areas, or the area does not have sufficient domain experts coverage, the PR might be tagged as experts needed and move slowly until experts are identified.

Merge requirement checklist

@Karlie-777 Karlie-777 requested review from a team as code owners February 26, 2025 22:44
requirement_level: recommended
examples: ["//*[@id='testBtn']"]
- id: user_action_type
type: enum
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to confirm the user_action_type enum. Currently, I am using the definitions from https://github.com/microsoft/ApplicationInsights-JS/blob/main/extensions/applicationinsights-clickanalytics-js/src/Enums.ts

name: browser.user_action
brief: >
This event describes actions performed by the user such as click, scroll, zoom, resize, etc.
body:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see a comment here to clarify that this is temporary or that this will actually be an attribute. That way readers do not expect to find content in the actual body.

- id: element
type: string
stability: development
brief: Target element tag name and it is obtained via event.target.tagName.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
brief: Target element tag name and it is obtained via event.target.tagName.
brief: Target element tag name and it is obtained via `event.target.tagName`.

Comment on lines +71 to +76
- id: click_coordinates
type: string
stability: development
brief: Click coordinates captured as a string in the format {x}X{y}.
requirement_level: recommended
examples: ["345X23"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this specific enough? Should this also specify if the coordinates are relative to the element or the page or the window or ???

- id: event.browser.user_action
stability: development
type: event
name: browser.user_action
Copy link
Contributor

@breedx-splk breedx-splk Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we think there's an opportunity to use another prefix/namespace other than browser? It seems like this is something that mobile (ios/android) could certainly also benefit from as well. If we can't make it broader to support multiple clients, then I fear we will encounter duplication later. I also undertand if the answer is "no, it doesn't make sense because browser already has all this stuff (eg. element xpath below, etc)"...but I think we should at least consider it.

Possible alternative namespaces: client.user_action, app.user_action, ux.action...

Copy link
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good, especially as a first pass "development" event, thanks! I left some comments and think there is room for improvement and possibly sharing/broadening, but I don't want those to block. Thanks for making this bite-sized!

@breedx-splk breedx-splk mentioned this pull request Mar 4, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants