We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi everyone! Thanks to owners for this module. It very helps and make development faster!
I have question. Because my event not happens. I want to detect what pages are not available and send event to GA.
Correct that $gtm not available on ssr stage? Might be better to use another structure?
middleware/navigation.js
export default function ({ app, route, req }) { if (route.name === 'not-found') { const domain = process.client ? window.origin : req.headers.host const data = { event: 'page_not_available', url: domain + route.path, } app.$gtm.push(data) } }
nuxt.config.js
router: { middleware: 'navigation', ... } }
into my _slug.vue
async asyncData({ app, store, params, redirect, route, }: { app: any, store: any, params: any, redirect: any, route: any }): Promise<any> { try { const response = await store.dispatch('....myvuex', { slug: params.slug, }) if (response.status_code === 400) { throw new Error(`${response.status_code}`) } } catch (error) { redirect('/404') // redirect({ name: 'not-found', params: { slug: route.path } }) } },
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi everyone! Thanks to owners for this module.
It very helps and make development faster!
I have question. Because my event not happens.
I want to detect what pages are not available and send event to GA.
Correct that $gtm not available on ssr stage? Might be better to use another structure?
middleware/navigation.js
nuxt.config.js
into my _slug.vue
The text was updated successfully, but these errors were encountered: