Forum Discussion
moti-sisense
01-21-2024Sisense Employee
The simplest JavaScript method to extract query parameters from the URL is:
/* If the URL has the query parameter ?myparam=123 */
const myParam = new URL(location.href).searchParams.get('myparam'); // myParam = '123'
You can use this in the dashboard script, however keep in mind that if this is needed across multiple dashboards or all dashboards, it would be better to implement as an Add-on to make maintenance easier (one shared add-on is easier to modify than multiple copies of the same dashboard script)