Skip to content

Commit

Permalink
feat: changed cookies bar and added dedicated events
Browse files Browse the repository at this point in the history
  • Loading branch information
demtario committed Apr 23, 2024
1 parent 2465270 commit 9888342
Show file tree
Hide file tree
Showing 10 changed files with 656 additions and 120 deletions.
9 changes: 9 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
</template>
<script setup lang="ts">
import { COOKIES_CONFIG, COOKIE_REQUIRED_ACCEPTED_KEY } from './consts/cookiesKeys'
import { useConfigStore } from './store/config'
const { showColorThemePicker, ekomiPopupToken } = usePublicRuntimeConfig()
Expand Down Expand Up @@ -54,6 +55,14 @@ useHead({
],
script: [...(seo.value.header_tags?.filter((tag) => tag.type === 'script') || [])],
})
onMounted(() => {
setTimeout(() => {
const { $enableGtm } = useNuxtApp()
const requiredCookie = useStatefulCookie<number>(COOKIE_REQUIRED_ACCEPTED_KEY, COOKIES_CONFIG)
if (requiredCookie.value) $enableGtm()
}, 3000)
})
</script>
<style lang="scss" scoped>
Expand Down
Loading

0 comments on commit 9888342

Please sign in to comment.