Tracking JavaScript API

This API allows to interact with the Quentn tracking JavaScript. We recommend to load the Quentn tracking script in the website header to make it available as soon as possible.

Functions:

setConfirmation

If you need a confirmation for the tracking of the visitor, you can use this function to tell the tracking script that the user confirmed.

_qntn.push(["setConfirmation", true]);

 

getConfirmation

Use this function to get the confirmation status from the current visitor. You have to register a callback function as second parameter. The parameter in this function (e.g. status) is boolean.

_qntn.push(["getConfirmation", function(status) { 
	//do something
 }])
;

 

customAction

You can trigger a custom action using this function. The second parameter has to be the name of the action as string. The same name has to be used when the trigger will be configured via the GUI.

_qntn.push(["customAction", name]);

 

setValue

To configure the tracking behaviour, you can set values using this function. "key" represents the name of the setting (string), while "value" stands for its value and can be string, int or bool, depending on the setting.

_qntn.push(["setValue", key, value]);

Settings you can use:

key value type Description
trackAnonymusUser bool If set to "true", anonymous visitors will be tracked otherwise they won't. Keep in mind that anonymous visitors cannot trigger any action in a campaign. Their tracking is only for statistic purposes.
creq bool If set to "true", a user's confirmation is required for tracking. That means if the user didn't confirm, he won't be tracked. If trackAnonymusUser = true, the user will be tracked as an anonymous visitor. If set to "false", every visitor will be tracked without asking.