posthog-js
posthog-js copied to clipboard
Allow for configurable privacy settings on sensitive elements
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]" ... />