PostHog / posthog-js-lite

Reimplementation of posthog-js to be as light and modular as possible.
https://posthog.com/docs/libraries
MIT License
70 stars 36 forks source link

Support capturing data attributes using `data-ph-capture-attribute` #217

Open itsramiel opened 7 months ago

itsramiel commented 7 months ago

Is your feature request related to a problem?

Yes

Describe the solution you'd like

I would like to be able to capture data attributes alongside my autocapture event. The documentation already mentions it and it is available in the posthog-js library but not in the react native library.

Describe alternatives you've considered

An alternative is to not use autocapture, but instead manually capture an event and add additional properties as an object, but I prefer to stay consistent where I use autocapture for events clicks with and without data

Related sub-libraries

marandaneto commented 7 months ago

@itsramiel thanks for the issue. Do you mean this right?

itsramiel commented 7 months ago

@marandaneto yes, I think that is the same link I linked to

marandaneto commented 7 months ago

@marandaneto yes, I think that is the same link I linked to

Oh, you are right, I clicked on it but probably looked at the wrong tab, the downside when you have N tabs :D

The logic would go here most likely and can be inspired by the JS bits.

Would you like to take a stab at it?

marandaneto commented 6 months ago

Another request https://posthog.com/questions/auto-capture-1

twicer-is-coder commented 2 months ago

Still not implemented.