πUsing __GLU_NUDGE_CLICK for Widget Visibility
This guide explains how to programmatically check and respond to the visibility state of CustomerGlu widgets by accessing the __GLU_NUDGE_CLICK property stored in localStorage.
Overview
Data Structure
{
"userID": {
"entrypointId": {
"campaignId": {
"clickedCount": 1
}
}
}
}Example Data
Field Explanation
How to Access Widget Visibility?
Basic Code Example
Use Cases
1. Conditional UI Rendering
2. Listening for Visibility Changes
3. Integration with Segment API
Best Practices
1. Defensive Coding
2. Performance Considerations
3. Cross-Device Considerations
Troubleshooting
Widget Visibility Inconsistencies
Missing Data
Visibility Configuration
Last updated