posthog icon indicating copy to clipboard operation
posthog copied to clipboard

Filter by attribute name

Open cabello opened this issue 3 years ago • 0 comments

Bug description

I am using Autocapture, so I went ahead and added name and data-name to most input, button, anchor that I would like to track.

When checking the event, I can only find that data inside the JSON tab:

image

There is no way to filter by that element name or create a custom metric. Also the toolbar doesn't use the name to come up with the CSS selector, that could be useful and more resilient than div > div > div > button.

This screenshot shows the selector for that same element using the Toolbar: CleanShot 2022-08-05 at 18 11 26@2x

The selector I was hoping it would write button[name="emojis::Cancel New Emoji"] maybe that is inefficient with a large dom? 🤔

It's worth mentioning tag name does show as an option to filter but not the input element name.

CleanShot 2022-08-05 at 18 09 27@2x

The docs does mention that to remain sensitive minimal information is capture on autocapture, but I was hoping I would be able to filter it.

How to reproduce

  1. Add name attribute to an input
  2. Turn autocapture on
  3. See events coming through instance
  4. Check the JSON tab to confirm name is being captured by Posthog
  5. Try to filter/search by that name attr__name

Environment

  • [x] PostHog Cloud

Thank you for spending the time and care to take a look into this issue! Appreciate it. 🙇

cabello avatar Aug 05 '22 22:08 cabello