DataDog / browser-sdk

Datadog Browser SDK
Apache License 2.0
279 stars 130 forks source link

💡 Tracking Keyboard 'Enter' Events #2805

Open blchelle opened 3 weeks ago

blchelle commented 3 weeks ago

Hi Datadog Folks,

One thing I've noticed as I'm working closely with Datadog RUM is that when a user hits 'Enter' on a button (as opposed to clicking with their cursor), this does not trigger an action event that is transmitted to Datadog RUM.

The ask here is NOT to track everytime a user types something in (very bad for privacy). Instead, I only want to track when the user hits the 'Enter' key, producing the same outcome as a 'mouse click' would.

I'm interested in getting feedback into whether this is something that has been discussed before and if it's a good idea/bad idea or feasible to implement.

Some More Context: I'm currently developing a script that leverages Datadog RUM's activity tracking to correlate our Frontend actions to network request. (i.e. We want a mapping that says the "Create User" button, always sends a network request to POST /api/user).

However, because some users hit the 'Enter' key rather than clicking the "Create User" button, the event doesn't get created in this case. The impact of this is that it weakens the correlation between actions and the corresponding endpoint.

Looking forward to discussing this further.

thomas-lebeau commented 3 weeks ago

Hi @blchelle, Thanks you for your feedback, this is indeed something that have been discussed in the past but there wasn't a strong customer use case for it.

For your use case, would using custom actions help?