Skip to content

useScriptGoogleAnalytics is not sending events  #184

Closed
@Codethier

Description

@Codethier

🐛 The bug

const { gtag, $script } = useScriptGoogleAnalytics({
  id: 'G-XXXXXXX'
})

gtag('event', 'conversion-test2')

The following code does not show up in analytics, neither as event event nor in the realtime dashboard, based on the docs nothing else needs to be done.

I've tried setting the usual things,

 gtag('js', new Date());
 gtag('config', 'G-XXXXXX')

But these are properly set already in the data layer so there is no need for that.

screens from tag assistant:

image
image

🛠️ To reproduce

https://stackblitz.com/edit/nuxt-starter-g9nj6p?file=pages%2Findex.vue

🌈 Expected behavior

Analytic events should be sent

ℹ️ Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions