3 ms·
> I’d encourage you to bless a “data-freshpaint” attribute as the preferred way to link events to your system. If you want to go through with this, you can do
by malisper 7y ago
> I’d encourage you to bless a “data-freshpaint” attribute as the preferred way to link events to your system.
If you want to go through with this, you can do this already with CSS classes. You can have classes like "freshpaint-login", "freshpaint-checkout", etc.
> IMO the only way this kind of event tracking can be done right is if developers and Product communicate and the devs, who understand the code, put the tracking in the right place.
If you have the resources to do this, I highly recommend you setup manual tracking. In Freshpaint, we give you the ability to fall back to manual event tracking if you want it. The thing is most teams don't have the resources to write tracking code for everything, so a lot of the time it just doesn't get done. We commonly hear it takes 3-6 months to get Segment fully setup, and even then you have to constantly write new tracking code as you launch new features.
- vosper 7y agoTrue, you could dedicate CSS classes like that. I’m really talking about separation of concerns: CSS is for styling, not communicating user intentions to external systems. A data attribute is better, and you could program the selector-creator to prefer those attributes if it can find them. That doesn’t help with after-the-fact attribution, though. That’s where using existing CSS classes really shines. With the huge proviso that you have to be sure the CSS selector you’re using really captures (and only captures) the action you’re trying to track. I suspect it’s easy to get this wrong and end up with skewed analytics.