You are here

gdprUserConsentElapsedTime

Used by the following Containers: 
Variable Type: 
Custom Javascript
This calculates the elapsed time since the user provided his consent, (in milliseconds)
	function() {
    var gdprUserConsent = {{gdprUserConsent}};
	var gdprUserConsentTimeStamp = {{gdprUserConsentTimeStamp}};
	if (gdprUserConsent == '1') {
    	var now = new Date();
    	var gdprUserConsentElapsedTime = now.getTime() - gdprUserConsentTimeStamp;
      	return gdprUserConsentElapsedTime;
    } else {
    	return undefined
    }
}

Add new comment