microsoft / microsoft/ApplicationInsights-JS

applicationinsights-clickanalytics-js extension should allow defining which element types clicks are tracked on

Open
#1,706 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
685
Forks
261
Avg merge
21h 33m
Merged PRs (30d)
5

Description

**Is your feature request related to a problem? Please describe.**
In many frameworks (Under ReactJS/Angular/Vue), components are made out of elements that are not traditionally clickable. Example: Combo boxes that are defined in their popup with LI(List). We want to be able to track such clicked elements as well as the out of the box ones. See here:
https://github.com/microsoft/ApplicationInsights-JS/blob/master/extensions/applicationinsights-clickanalytics-js/src/handlers/AutoCaptureHandler.ts#L58
Example of such popular framework is React's Material UI: https://v4.mui.com/

**Describe the solution you'd like**
There should be a way to define in the configuration of this extension which additional elements types can be tracked.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
We had to add explicit event handlers to all these components to fire AI custom events. That creates a pretty big pollution to our code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in extensions/applicationinsights-clickanalytics-js/src/handlers/AutoCaptureHandler.ts around line 58 to understand which element types are currently tracked. Add a configuration path for additional element types and verify that clicks on elements such as list items are captured without requiring explicit event handlers.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.