Open junyongxlee opened 1 year ago
I am trying to use the track function in one of the page but it is showing undefined
this.$fb.track('ViewContent') Cannot read properties of undefined (reading '$fb'
this.$fb.track('ViewContent')
$fb.track('ViewContent') ReferenceError: $fb is not defined
$fb.track('ViewContent')
to access $fb in nuxt3 we have to follow this
import { useNuxtApp } from '#app'; const nuxtApp = useNuxtApp() console.log(nuxtApp.$fb)
I am trying to use the track function in one of the page but it is showing undefined
this.$fb.track('ViewContent')
Cannot read properties of undefined (reading '$fb'$fb.track('ViewContent')
ReferenceError: $fb is not defined