{"repo":"gabrielbarth/analytics-event-factory","free":true,"listed":false,"github":"https://github.com/gabrielbarth/analytics-event-factory","clone":"git clone https://github.com/gabrielbarth/analytics-event-factory.git","description":"Analytics Event Factory","language":"TypeScript","stars":22,"topics":["analytics","analytics-tracking","analyticsjs","events","tracking"],"license":null,"category":"analytics","readme_excerpt":"analytics-event-factory analytics-event-factory is a lightweight and customizable library for standardizing analytics event creation and dispatch. It helps maintain a structured and consistent format for event metadata, making it easier to track user interactions and debug analytics pipelines. 🚀 Installation 💡 Features - Flexible event creation system. - Easily configurable event metadata and labels. - Supports callback functions for custom event processing. - Page and element-based event standardization. 📖 Usage Example Expected Output 🔧 Configuration Options The eventCreator function accepts two primary configuration objects: callback A function that will be executed whenever an event is dispatched. options An object to customize event behavior. Option Type Description ------------------------------ ---------- -------------------------------------------- page.showOnLabel boolean? Show the page name in the event label. page.currentPage string? The current page name. page.showOnMetadata boolean? Include the page name in the event metadata. element.showElementIdOnLabel boolean? Show the element ID in the event label. 📚 API Reference eventCreator({ callback, options }) Creates an event handler with the given callback and configuration options. Parameters - callback : A function to handle dispatched events. - options : An object for configuration, as described in the table above. Event Dispatch Methods Each event handler provides functions to dispatch events by type (e.g., ","default_branch":null,"files":null,"tree":[],"storefront":"/r/gabrielbarth","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gabrielbarth/analytics-event-factory/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}