Proactive Messages (Nudge)
Proactive “nudge” messages greet visitors automatically based on rules (e.g. page or time on site). The widget reports engagement events; the dashboard endpoints manage rules and view analytics. Authentication required except the public event tracker.
POST
/api/v1/proactive/event PublicTrack a proactive event from the widget (shown / clicked / dismissed).
Request body
{ "site_key": "sk_…", "session_id": "sess_…", "event": "shown", "rule_path": "/pricing" }Response
{ "success": true }GET
/api/v1/sites/{id}/nudge/rules AuthGet the proactive rules for a site.
Response
{ "success": true, "rules": [ { "path": "/pricing", "variants": [ { "message": "Questions about pricing?", "weight": 100 } ] } ] }PUT
/api/v1/sites/{id}/nudge/rules AuthReplace the proactive rules. Each rule has a path and weighted message variants (A/B).
Request body
{ "rules": [ { "path": "/pricing", "variants": [ { "message": "Questions about pricing?", "weight": 100 } ] } ] }Response
{ "success": true }GET
/api/v1/sites/{id}/nudge/analytics AuthEngagement analytics (impressions, clicks, conversions) per rule.
Response
{ "success": true, "rules": [ … ], "totals": { … } }DELETE
/api/v1/sites/{id}/nudge/analytics AuthReset proactive analytics for the site.
Response
{ "success": true }