getCurrentUrl

The getCurrentUrl() method returns the URL of the currently tracked page, either from the address bar or as set by the setCustomUrl() method.

Syntax

getCurrentUrl()
Not available
Not available
Not available
Not available
Not available
Not available

Returns

The current page URL.

Format: Example: https://example.com/blog

Type: string

Examples

To get the current page URL:

_paq.push([function () {  
    console.log(this.getCurrentUrl());  
}]);
Not available
Not available
Not available
Not available
Not available
Not available

A sample of the return statement:

https://example.com/blog

Related methods