Closed YosefMets closed 1 year ago
Please make sure that you are in browser context and you have correctly enabled it
You can test/debug/log $gtm.enabled()
and $gtm.isInBrowserContext()
and see if both returns true
The debugging is performed (by design) even if the trigger gets not executed
@Shinigami92, console.log:
$gtm.enabled(): true
$gtm.isInBrowserContext(): true
[GTM-Support]: Dispatching event {event: 'add_to_cart', category: 'ecommerce', action: 'click', label: 'Adding item to cart', value: 5000}
Looks like everything is ok but still not working
Okay, sadly in that case I don't know what's going on
Feel free to also log what's happening with window.dataLayer
, but I'm done with my knowledge
The datalayer gets new records every time the event is called, as expected
Then the issue is not anymore on the plugin's side, but on something with GTM itself Check your GTM-ID or anything like that, look into the account Search or ask on Stack Overflow ...
I'm using
@gtm-support/vue-gtm
in Nuxt 3 AppInfo
vue-gtm.client.js
:Then
page_view
works. Then I try usetrackEvent
in thesetup
:composables/useGTM.js
:myComponent.vue
:When I'm adding item to cart nothing's happened in the Googlу Analytics. There is also no new request in the "Network". But in the console I see
What am I doing wrong?