---
title: "PageAssist advanced configuration"
date: "2021-12-29T12:00:34+00:00"
summary: "Customize PageAssist widget behavior, open/close on specific actions, and disable hotkeys for enhanced website accessibility."
image:
type: "page"
url: "/web-governance/pageassist-advanced-configuration"
id: "fe585abe-c0ed-43ff-b7e7-be6112a9c520"
---

Introduction
------------

By default, when PageAssist is activated it always appears on the website. This allows visitors to interact with it at any time. Other configurations are possible and PageAssist can be set up to behave differently.

This document provides instructions on how to configure the PageAssist widget to open or close when a visitor performs a specific action on the page, for example when the visitor clicks on a button or link.

Set an element to open PageAssist
---------------------------------

Hide the **PageAssist** widget until a visitor performs an action on the page, for example when the visitor clicks on a button or link.

How to set it up:

1.  Hide the PageAssist widget on the website with CSS:
    
        #monsido-pageassist {
        display: none !important;
        }
    
    For more information, visit [PageAssist CSS Selector Basics](/web-governance/pageassist-setup-css-selectors "PageAssist setup with CSS selectors").
    
2.  Select an element on the website to trigger PageAssist when the user clicks on it, and then assign it a unique ID. In this example, we assign the ID “open-page-assist” to a button element:
    
        ​​<button id="open-page-assist">Open PageAssist</button>
    
3.  Add the following script:
    
        var openPageAssistButton = document.querySelector("#open-page-assist");
        openPageAssistButton.addEventListener("click", function() {
          monsidoPageAssist.openPageAssist();
        }); 
    
    Note
    
    When you implements the script on their website (admin user function), remember to replace 
    
    `“#open-page-assist”` with the ID of your target element.
    

**Set an element to close PageAssist**
--------------------------------------

It is also possible to close the **PageAssist** widget when a visitor performs a specific action on the page, for example, when the visitor clicks on a button or link.

Use the following method:

    monsidoPageAssist.closePageAssist()

How to disable PageAssist hotkeys
---------------------------------

Sometimes websites have a live edit mode and when they perform `shift+o` with PageAssist enabled, it opens PageAssist.

To disable the hotkey, manually add the parameter `hotkeyEnabled: false`, to the PageAssist script. See the example below where it is added at the bottom of the script.

    <script type="text/javascript">
    
        window._monsido = window._monsido || {
    
            token: "dfgdfgdfgdfgnvbc",
    
            heatmap: {
    
                enabled: true,
    
            },
    
            pageAssistV2: {
    
                enabled: true,
    
                theme: "light",
    
                mainColor: "#783CE2",
    
                textColor: "#ffffff",
    
                linkColor: "#783CE2",
    
                buttonHoverColor: "#783CE2",
    
                mainDarkColor: "#052942",
    
                textDarkColor: "#ffffff",
    
                linkColorDark: "#FFCF4B",
    
                buttonHoverDarkColor: "#FFCF4B",
    
                greeting: "Discover your personalization options",
    
                direction: "leftbottom",
    
                coordinates: "undefined undefined undefined undefined",
    
                iconShape: "circle",
    
                title: "Personalization Options",
    
                titleText: "Welcome to PageAssist™ toolbar! Adjust the options below to cater the website to your accessibility needs.",
    
                iconPictureUrl: "logo",
    
                logoPictureUrl: "",
    
                logoPictureBase64: "",
    
                languages: [""],
    
                defaultLanguage: "",
    
                skipTo: false,
    
                alwaysOnTop: false,
    
                hotkeyEnabled: false,
    
            },