ClickTracker Documentation
Overview
The ClickTracker component provides a seamless way to intercept mouse click coordinates on any specific UI element. It bridges the gap between standard browser click events and OutSystems logic, offering high-precision decimal values.
🔧 Technical Implementation
1. The Logic Flow
The component uses a JavaScript Event Listener attached to the target DOM element.
2. Parameters & Properties
Input Parameters
Events
💡 Implementation Guide (Step-by-Step)
Standard Setup
Dynamic Elements
If your target element is inside a List or Block, ensure you are passing the correct Id for that specific instance. The component is designed to be instantiated multiple times on the same page without conflicts.
⚠️ Troubleshooting & FAQ
Q: The coordinates are always 0 or it's not triggering.
Q: Why use Decimal instead of Integer?
Q: Does it work on Mobile?
🗑️ Cleanup and Performance
The component automatically manages its lifecycle. When the screen changes or the block is removed from the DOM via an If widget, the JavaScript listener is explicitly removed using removeEventListener to prevent Memory Leaks.