Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Event Subscription Management in Single Page Applications

    Posted 07-14-2025 11:56

    I have a question related to proactive engagement in the context of Single Page Applications (SPAs).

    My website is built as a Single Page Application, which means users navigate through different views/sections without full page reloads. When I subscribe to tracking events (such as page inactivity after a certain time period), these event subscriptions remain active throughout the entire user session as they navigate across different sections of the application.

    Once an event subscription is established (for example, tracking user inactivity on a specific page/section), it continues to monitor and potentially trigger across all subsequent navigation within the SPA. This can lead to inappropriate proactive engagement triggers firing on sections of the site where they shouldn't be active.

    Is there a way to programmatically unsubscribe from or revoke specific tracking event subscriptions?

    Any insights or documentation references would be extremely helpful!
    Thanks in advance


    #WebMessaging

    ------------------------------
    Tiziano Perchinunno
    Solution Architect
    ------------------------------


  • 2.  RE: Event Subscription Management in Single Page Applications
    Best Answer

    Posted 07-15-2025 08:14

    Hi Tiziano,

    You should be able to use PUT /api/v2/notifications/channels/{channelId}/subscriptions.  This will allow you to update your current list of subscriptions.  Be aware that you need to provide a complete list of new subscriptions.  The API does not allow addition and deletion of individual topic subscriptions.

    Thanks,
         John



    ------------------------------
    John Carnell
    Director, Developer Engagement
    ------------------------------