Blenra LogoBlenra
Optimized for: Gemini / ChatGPT / Claude
#React

Automated E-commerce Analytics Event Tracking with Zustand Middleware

Customize the variables below to instantly engineer your prompt.

Required Variables

zustand-analytics-event-tracking.txt
Act as a Marketing Data Engineer. Architect a bespoke, highly transparent Zustand middleware wrapper that autonomously intercepts state mutations and triggers real-time [ANALYTICS_SDK] (e.g., Google Analytics 4, Segment, Mixpanel) tracking calls. The middleware must execute a switch statement filtering explicitly for high-value actions defined in the [TRACKED_ACTIONS_LIST] (like 'ADD_TO_CART' or 'INITIATE_CHECKOUT'). Map the raw Zustand state variables via a precise [PAYLOAD_MAPPING] function into the exact JSON schema demanded by the analytics provider's API. This tracking architecture must be completely decoupled and invisible to the React UI developers, handled entirely at the state mutation layer to ensure 100% analytics coverage without littering the component tree with tracking code.

Example Text Output

"An automated tracking layer that ensures every business-critical action is logged for marketing analysis with zero additional UI code."

More Web Components Prompts

View all →

Frequently Asked Questions

What is the "Automated E-commerce Analytics Event Tracking with Zustand Middleware" prompt used for?

An automated tracking layer that ensures every business-critical action is logged for marketing analysis with zero additional UI code.

Which AI tools work with this prompt?

This prompt is optimized for Gemini / ChatGPT / Claude, but works great with ChatGPT, Claude, Gemini, and other large language models. Simply copy it and paste it into your preferred AI tool.

How do I customize this prompt?

Use the variable fields above to fill in your specific details. The prompt will auto-update as you type, ready to copy instantly.

Is this prompt free?

Yes! All prompts on Blenra are free to copy and use immediately. No account required.