Stop storing impressions in localStorage
Blog post from Frigade
Frontend engineers often face the challenge of showing UI elements like tooltips only once to a user, typically storing a flag in localStorage to track impressions. However, this approach is limited as localStorage data is browser-specific and has constraints such as limited data storage capacity, synchronous operations, and security issues. A more efficient solution involves using a server-side service that tracks user-specific data across sessions and devices, implemented via a key-value store API linked to the frontend. This method allows for more nuanced user interaction tracking, such as showing tooltips at specific intervals or to certain user roles, and is scalable beyond simple binary tracking. Despite the initial simplicity of building custom solutions for impression tracking, complexities arise as systems evolve, prompting many companies to adopt third-party platforms like Launch Darkly or Posthog for feature flag management. Alternatively, Frigade offers a comprehensive solution with API and UI components to manage user impressions effectively, providing an option for those who prefer not to develop their own systems.