Skip to content

Commit

Permalink
fix(cookie-consent): handled breaking changes from gtag
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-mulier-p committed Mar 12, 2024
1 parent 0443163 commit 6e763da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default defineNuxtConfig({

gtag: {
id: 'G-EYVNS03HHR',
initialConsent: false
enabled: false
},

runtimeConfig: {
Expand Down
4 changes: 2 additions & 2 deletions plugins/cookieconsent.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export default defineNuxtPlugin(nuxtApp => {
const isEurope = Intl.DateTimeFormat().resolvedOptions().timeZone.indexOf("Europe") === 0;

nuxtApp.hook('page:finish', () => {
const {grantConsent} = useGtag()
const {initialize} = useGtag()

const enabledAnalytics = async () => {
grantConsent();
initialize();

const response = await axios.get('https://api.kestra.io/v1/config', {withCredentials: true})

Expand Down

0 comments on commit 6e763da

Please sign in to comment.