Log consent on your existing forms

Log consent event to Triggerbee

If you want to pass consent documentation from your own forms to Triggerbee you need to log it using javascript. The method is mtr_consent.logConsent():

window.mtr_consent.logConsent(contextTitle, consentText);
	

And to avoid sending to Triggerbee server right-away and doing it yourself afterward (optional parameter):

var sendEventToTracker = false; window.mtr_consent.logConsent(contextTitle, consentText, sendEventToTracker);
	

contextTitle = the context for consent, for example "Sign up newsletter with 25% discount" or "Purchase".

consentText  = the short text describing what the visitor agrees to, for example, "I consent to receive marketing communication and understand that my personal data will be handled in accordance with the privacy policy."

Example

if (document.addEventListener) {
	document.addEventListener("onConsentInitialized", function (event) {
		var mtr_custom = mtr_custom || {};
		mtr_custom.session = mtr_custom.session || {};
		mtr_custom.session.email = "erlich@piedpiper.com";
		mtr_custom.session.name = "Erlich Bachman";
		window.mtr_consent.logConsent("Sign up newsletter with 25% discount", "I consent to receive marketing communication and understand that my personal data will be handled in accordance with the privacy policy.");
	});
}

The privacy policy version of the given Consent is set automatically to the privacy policy version currently published on the website.

NOTE: Before making this call you must first log the email address of the user

https://help.triggerbee.com/article/49-setting-identity-of-visitor

Still need help? Contact Us Contact Us