Clientside Page View

Sends a clientside tracking page view to the sitesights.io backend.

 

Typically you want to call this method only once per page load. The only reason to call it multiple times, is having clientside navigation like in a Single Page Application (SPA). For both of these cases we have a great guide on how to set it up correctly, check it out in the link below:

Setup Clientside API

Read more

If you want to know more about the ClientId Parameter, you should checkout the following this link.

 

options object required
Set of all options for the page view
Absolute string or null

Optional overwrite of what absolute page url is sent (ex. https://www.youtube.com/watch?v=video)

Close allowed values
Expand allowed values
Valid absolute URL
An absolute valid URL like location.href
ClientId string or null

Optional string identifier to identify current visitor. This is very specific to your website, for example if a lot of your users have an account and are logged in. You could use their Unqiue Account ID here (This will be hashed beyond recognition) or if you get the permission of your visitor, you can use something like fingerprinting. For a much more detailed explaination, please go here.

Example of a standard request without filling any parameters.

Standard call
MDAL.pageView({
	"Absolute": null,
	"ClientId": null
});

Example of setting a custom url and using a account uid as identifier.

Custom properties
MDAL.pageView({
	"Absolute": "https://app.sitesights.io/websites",
	"ClientId": account.UID
});

ClientId Parameter

Read more