MatteoGabriele/vue-gtag

Ownership Verification on Google Search Console

emretepedev opened this issue · 1 comments

Description

I am able to add vue-gtag with nuxt and work like a charm.
issue2

Now I am trying to link Google Analytics property to the Google Search Console property. But it is failed with an error "Verification unsuccessful".
And Google says that:
issue1

Expected behavior

Since vue-gtag has been added to my website and Google Analytics (version 4) is working, associating Google Search Console property also must work.

Actual behavior

"Verification unsuccessful" error on Google Search Console.

Environment

vue-gtag@1.16.1
nuxt@2.15.8

Extra

My installation snippet in "plugins/vue-gtag.js"

import { defineNuxtPlugin } from '@nuxtjs/composition-api'
import Vue from 'vue'
import VueGtag from 'vue-gtag'

export default defineNuxtPlugin(({ $config }) => {
    // to access all options https://matteo-gabriele.gitbook.io/vue-gtag/plugin-options
    Vue.use(VueGtag, {
        enabled: true,
        bootstrap: true,
        pageTrackerEnabled: true,
        config: {
            id: $config.googleAnalytics4Id,
            params: {
                send_page_view: true,
            },
        },
        deferScriptLoad: true,
    })
})

and in "nuxt.config.js"

    // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
    plugins: [
        '~/plugins/vue-gtag',
    ],

I don't think this has anything to do with this plugin. This is a wrapper of gtag.js; I don't do anything else behind the scenes more than make some tasks (hopefully) more accessible. Everything else is on the environment you are working on and your Google setup.
But please, if I am wrong and you do find that this error is related to the code in this plugin, come back to me and I will take care of it.
Thanks again