Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards

Working with Monitoring Hooks in WebSDK

Avatar

Employee

4/25/25

Introduction

As WebSDK gains momentum, there tends to be questions from clients about leveraging previous features in the previous Target library at.js. One of those features was at.js Custom Events. This feature could come in handy as it allowed you to hook into a mbox to notify you when at.js is loading, starts, succeeds, and fails. A common use case was to use these custom events to kick off some sort of notification process to let a client know that their test was running correctly or there was an error that needed to be looked into further.

Comparing the Two

The good news is that the product team has developed an equivalent feature for WebSDK, these are called monitoring hooks. Naturally the first question that comes to mind is what are the equivalent monitoring hooks compared to the at.js custom events?

Here is a table I created to map out the equivalent monitoring hook based on the previous custom event,

vinay_sodha_0-1745605783264.png

Sample Implementation

Let’s take a look at a sample implementation I’ve created in a sandbox environment as having context always helps to illustrate functionality. This implementation assumes you have Target implemented through WebSDK in Launch.

First let’s create a new rule called ‘Monitoring Hooks – Demo’. For the event we’re going to use the ‘Adobe Experience Platform Web SDK’ extension and the event type is called ‘Monitoring Hook triggered’. For this simple demo we’re going to use the ‘onContentRendering’ monitoring hook so make sure to select that.

 

vinay_sodha_1-1745605833897.png

 

The next task we need to do is create an action for a rule. We’re going to create a core action, so create an action using the ‘Core’ extension and for action type select ‘Custom Code’. Finally open up the editor and we’re going to use some simple code to log a console statement upon a successful content rendering.

 

vinay_sodha_2-1745606003094.png

 

Make sure to save your changes and build your library.

Using a sample activity you should be able to go to the page and now see the console statement upon a successful rendering of your activity.

 

vinay_sodha_3-1745606803408.png

 

Conclusion

Hopefully in reviewing the comparison table and sample implementation you’re able to apply monitoring hooks to your particular use case. As WebSDK continues to gain more adoption, be on the lookout for further write ups on you can make the most out of your implementation whether it’s porting over existing features or taking advantage of new ones.

---

Are you looking to optimize your website's performance and drive conversions? 
Look no further than Adobe - the industry leader in A/B testing. With more A/B tests under our belt than any other organization in the world, we have the expertise and knowledge to take your online presence to the next level. Adobe Target is unrivaled in the industry, and with Adobe Consulting, you can have access to this powerful tool and the expertise behind it. Don't miss out on the opportunity to unlock the full potential of your website. Contact us today and discover how Adobe can help your business thrive. If you would like to understand how Adobe can help your business reach out to Adobe Professional Services.

 

2 Comments