Skip to content

Small Javascript Library for DSGVO - Consent Management

License

Notifications You must be signed in to change notification settings

tubsn/consentmanager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

flundr Consentmanager

Small Javascript Library for DSGVO - Consent Management

ConsentManagerPreview

Start and Options

window.consentManager = new ConsentManager({
	cookieName : 'consentCookie',
	cookieExpireDays : 365,
	closeOnModalClick : true,

	headline : '<h3>New Headline</h3>',
	text : '<p>Here you can Edit the Teasertext</p>',
	buttonText : 'Speichern und schließen',

	fields : [

		{
			name: 'marketing',
			label: 'Marketingdaten - <i>Helfen Sie uns relevantere Angebote zu erstellen</i>',
		},

		{
			name: 'tracking',
			label: 'Nutzerdaten Analyse - <i>Wir möchten lernen, was Sie bei uns interessiert</i>',
		},

		{
			name: 'mandatory',
			label: 'Berechtigtes Interesse - <i>z.B. zum speichern des User Logins</i>',
			mandatory : true
		},
	],

	details: '<small>Read more in our <a target"_blank" href="/datapolicy">Datapolicy</a></small>'
});

Consent Layer Options

<button onclick="consentManager.show()">Show Consent Layer</button>
<button onclick="consentManager.activate('marketing')">Activate and Reload Page</button>
<button onclick="consentManager.deactivate('marketing')">Deactivate and Reload Page</button>
<button onclick="consentManager.reset()">Delete Consent Cookies</button>

Get Users Consent Status

'marketing' is the Consentfields name

<script>
if (consentManager.status('marketing')) {
  // Your Marketing Code here	
}
</script>

About

Small Javascript Library for DSGVO - Consent Management

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published