How to setup Google Analytics #76
Replies: 1 comment 2 replies
-
Hi @danielvlla If you intend to use a consent form, you will need to implement google analytics using the composable in conjunction with useScriptTriggerConsent You could put this, for example, in your app.vue file. const agreedToCookiesScriptConsent = useScriptTriggerConsent()
useScriptGoogleAnalytics({
scriptOptions: {
trigger: agreedToCookiesScriptConsent
}
}) You will need to manually implement the UI yourself. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using the documentation, I installed nuxt/scripts succesfully for Google Analytics use by adding this to my Nuxt Config.
This is my first time implementing Google Analytics on a Nuxt site. I just want simple analytics (no need for custom events).
From what I understand, I need to implement a consent form for accepting or declining cookies right? This seems to be required especially in the EU. But then I am not sure what do to with that information and how to communicate it to Google Analytics using nuxt/scripts.
Am I missing anything else please?
Beta Was this translation helpful? Give feedback.
All reactions