Returns blockingMode
this.$cookiebot.blockingMode
Returns cookieBotID
this.$cookiebot.cookieBotID
Returns wether or not the scripts are going to be loaded asynchronously
this.$cookiebot.isAsync
Returns the default locale or 'en' if not set
this.$cookiebot.locale
Appends the needed scripts for displaying the consent banner. Tip: use with vue-i18n
Param | Type | Default | Required |
---|---|---|---|
async | boolean | this.$cookiebot.isAsync | no |
locale | string | this.$cookiebot.locale | no |
<script>
export default {
name: 'MyVueComponent',
mounted () {
this.$cookiebot.consentBanner({
async: true,
locale: 'en' // tip: replace 'en' with this.$i18n.locale when using vue-i18n
})
}
}
</script>
Appends the needed scripts for displaying the consent page content. Tip: use with vue-i18n
Param | Type | Default | Required |
---|---|---|---|
async | boolean | this.$cookiebot.isAsync | no |
locale | string | this.$cookiebot.locale | no |
ref | HTMLVueElement | none | yes |
<template>
<div ref="consent"></div>
</template>
<script>
export default {
name: 'MyVueComponent',
mounted () {
this.$cookiebot.consentPage({
async: true,
locale: 'en', // tip: replace 'en' with this.$i18n.locale when using vue-i18n
ref: this.$refs.consent // Must be a Vue ref or html element
})
}
}
</script>