posthog-js icon indicating copy to clipboard operation
posthog-js copied to clipboard

Allow for configurable privacy settings on sensitive elements

Open samwinslow opened this issue 3 years ago • 0 comments

A customer would like to support more than just name, id, and class attributes on <input> tags.

Currently the isSensitiveElement function considers all inputs (except those with type='button') as sensitive, meaning only the above limited set of attributes will be sent.

Given that the user may sometimes want to send data- attributes and so on, it would be nice to be able to specify opt-in fields to capture, i.e. the opposite of .ph-no-capture.

Example pseudo-markup of proposed solution:

<input type="text" id="business-name" data-tag="some-value" class="ph-capture[data-tag]" ... />

samwinslow avatar Oct 12 '21 14:10 samwinslow