getPageUrl

Gets the full URL for a dashboard page.

Signature

Copy
1
(destination: Destination) => Promise<string>

Parameters

NameTypeDescription
destinationDestinationURL destination details.

Destination Object

Copy
1
{
2
pageId: string;
3
relativeUrl?: string;
4
}
NameTypeDescription
pageIdstringID of the page to link to. Use the Page IDs table to find the appropriate ID.
relativeUrlstringOptional. URL segment to append to the base URL of the selected page. Can include path segments, a query string, and a fragment identifier.

Returns

Copy
1
Promise<string>

The URL of a dashboard page with the provided relativeUrl value appended.

Examples

To set up a dashboard client, refer to the setup guide.

Get the URL of the dashboard's home page with a query string

Copy
1
const pageUrl = await client.dashboard.getPageUrl({pageId: 'home', relativeUrl: '?referal=page-3'});
Was this helpful?
Yes
No