You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means any <input> with type="text", type="number", type="email", type="search", or no type attribute at all (e.g., PrimeNG's pInputText/p-inputnumber output) is silently excluded from click capture, even though:
"input" is present (by default) in trackElementTypes, and
Nothing in the README or IClickAnalyticsConfiguration/Datamodel.ts docs mentions this second, independent restriction.
This is easy to confuse with _clickCaptureElements/trackElementTypes (which is documented and configurable) since both allowlists happen to include the token BUTTON. Users debugging "why don't my text field clicks show up in customEvents" have no way to discover this behavior short of reading the plugin's source.
Related but distinct: #2136 addressed making the tag-name list (trackElementTypes) configurable; it did not touch this input-type allowlist.
Describe the solution you'd like
Document clickCaptureInputTypes and its behavior in the README/config docs, explicitly noting that trackElementTypes including "input" does not guarantee all <input> clicks are captured. If this is an issue of possibly exposing user inputted data, it would be nice to call that out.
Ideally:
Expose clickCaptureInputTypes as a configuration option (similar to how trackElementTypes was made configurable for Click analytics not logging no native html input elements #2136), so consumers can opt in to capturing clicks on text/number/search inputs if they've assessed the PII/data-sensitivity tradeoffs for their own app.
AutoCaptureHandler.tsapplies two independent filters before capturing a click on a native<input>element:The element's
tagNamemust be in_clickCaptureElements(derived from the configurabletrackElementTypesoption, defaulta,button,area,input).If the tag name is
INPUT, the element'stypeattribute must also match a second, hardcoded, non-configurable allowlist:This means any
<input>withtype="text",type="number",type="email",type="search", or notypeattribute at all (e.g., PrimeNG'spInputText/p-inputnumberoutput) is silently excluded from click capture, even though:"input"is present (by default) intrackElementTypes, andNothing in the README or
IClickAnalyticsConfiguration/Datamodel.tsdocs mentions this second, independent restriction.This is easy to confuse with
_clickCaptureElements/trackElementTypes(which is documented and configurable) since both allowlists happen to include the tokenBUTTON. Users debugging "why don't my text field clicks show up incustomEvents" have no way to discover this behavior short of reading the plugin's source.Related but distinct: #2136 addressed making the tag-name list (
trackElementTypes) configurable; it did not touch this input-type allowlist.Describe the solution you'd like
clickCaptureInputTypesand its behavior in the README/config docs, explicitly noting thattrackElementTypesincluding"input"does not guarantee all<input>clicks are captured. If this is an issue of possibly exposing user inputted data, it would be nice to call that out.Ideally:
clickCaptureInputTypesas a configuration option (similar to howtrackElementTypeswas made configurable for Click analytics not logging no native html input elements #2136), so consumers can opt in to capturing clicks on text/number/search inputs if they've assessed the PII/data-sensitivity tradeoffs for their own app.