---
sourceDocument: Australia Employee Service Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/employee-service-management

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Employee Service Management

ft:clusterId :

    - emplsm

bundleId :

    - emplsm

workflow :

    - Employee


---

# Add hotspots to track custom widget performance

# Add hotspots to track custom widget performance {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 min. de leitura

Hotspots help capture and log widget load times, which enables better debugging of long portal load times.

## Antes de Iniciar

Role required: sp_admin

## Procedimento

1. Navigate to AllService PortalWidget.
2. Click the custom widget you want to add the hotspot to.
3. Insert the following code snippets into the Server script field:  
   Define a start time below the loading configuration expression:

       var startTime = new GlideDateTime();

   Retrieve widget instance identifier:

       data.spInstanceId =
                                   grInstanceRecord.getUniqueValue();

   Add load time tracking:

       new sn_cd.cd_Utils().postInstanceHotspot({
       				startTime: startTime,
       				callerId: data.spInstanceId,
       				shortDesc: '{insert a short description}'
       		});

4. Click Update.

## O que Fazer Depois

Open the Performance details window to view how long the custom widget takes to load data: [View widget performance metrics](https://servicenow-prod.fluidtopics.net/~89aPgbekQxsIOlIsG8GhQ "View the metrics provided by the performance window to identify which widgets take the longest to load data.")

