Cookz 🐕
Cookz is a cookie manager, with integrated services.
You can see an online demo
CONSTRUCTOR
const cookies = // Performance service auto add a functional cookie type: TYPESPERFORMANCE service: 'GA' UA: 'UAXXXXXXX' // Add all ga properties ... anonymizeIp: true firstPageView: true forceSSL: true // GTM type: TYPESPERFORMANCE service: 'GTM' ID: 'GTM0000' // FBQ Pixel Facebook type: TYPESADVERTISING service: 'FBQ' ID: '208499613540246' // Custom functional cookie type: TYPESFUNCTIONAL name: 'experience' // Can add required cookie required: true
SERVICES
const UA = 'UAXXXXXX' // Use servicesservicesgtm servicesfbq servicesga
STORE VALUES
- popinStatus : Is popin visible
- bannerStatus : Is banner visible
- hasInteract : Has user interact with cookz
- functional : Functional cookie
- performance : Performance cookie
- social : Social cookie
- advertising : Advertising cookie
COOKIES TYPES VALUES
- TYPES.FUNCTIONAL
- TYPES.PERFORMANCE
- TYPES.SOCIAL
- TYPES.ADVERTISING
LOCALISATION
const translations = banner: title: 'Banner <br/><br/>title' description: 'Banner desc' accept: 'Accept' configure: 'Configure' refuse: 'Refuse all' TYPESFUNCTIONAL: title: 'title func' description: 'description func' TYPESPERFORMANCE: title: 'title perf' description: 'description perf' TYPESSOCIAL: title: 'title social' description: 'description social' TYPESADVERTISING: title: 'title advert' description: 'description advert' submit: 'Submit'
SAMPLES
// Same for all store values // Get valuestorebannerStatus// Set valuestorebannerStatus// Listener function { console }// ListenstorebannerStatus// UnlistenstorebannerStatus