> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Why Does the Screen Freeze After Closing the OSM Campaign?

> Webpage freezing after closing an On-site Messaging campaign? Add the required trackDismiss and dismissMessage functions to the close button.

## Problem

The webpage experiences a temporary freeze after the On-site Messaging (OSM) campaign is closed.

## Solution

To resolve the issue, ensure the following functions are included under **Settings** > **Styling** > **Custom Attributes** in the close button when closing the OSM campaign:

* MoeOsm.trackDismiss();
* MoeOsm.dismissMessage();

![Screenshot 2025-01-22 at 3.27.15 PM.png](https://mintcdn.com/moengage/UX7SFw6G5JwoHWFq/images/moengage_5ee5a9.png?fit=max\&auto=format\&n=UX7SFw6G5JwoHWFq\&q=85\&s=77844c5dbef6d6f0bd5b10f74495b952)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.