MatteoGabriele / vue-gtag-next

Global Site Tag plugin for Vue 3 (gtag.js)
MIT License
44 stars 3 forks source link

Google conversions not being triggered ! #32

Open eeerrrttty opened 2 years ago

eeerrrttty commented 2 years ago

Here is my code:

    onMounted(() => {
      window.onbeforeunload = store.dispatch('checkout/beforeEnterPage').then(() => {
        property.value = {
          id: AW-CONTAINER-ID,
          params: {
            send_page_view: false
          }
        }
        track()
      })
    })
    const track = () => {
      event('conversion', {
        send_to: 'AW-CONTAINER-ID/CONVERSIONLABEL',
        value: 147.0,
        currency: 'BRL',
        transaction_id: ''
      })
    }

Documentation at vue-gtag-next site should be better.