---
title: "Methods"
date: "2024-07-24T19:17:32+00:00"
summary: "Discover Acquia Web Governance script functions for tracking pageviews, events, searches, and managing cookie consent on your website."
image:
type: "page"
url: "/web-governance/methods"
id: "b8c718ee-697a-4c37-8524-54936d1330b3"
---

The Web Governance script contains functions that can be utilized. They are located on `window.monsido_functions`.

Name

Arguments

Description

trackPageview

url?: string

The URL that should be tracked. If empty, it will use the current URL.

trackEvent

eventCategory: string, eventAction: string, eventName: string, eventValue?: number

 

setCookieConsent

None

Set consent from the user that cookies are allowed. This will create a cookie.

removeCookieConsent

None

Remove consent from user that cookies are allowed. This will delete the cookie.

trackSearch

searchString: string, searchCount?: number

Track searches on the website and count the number of results on the search results page.