You should not use this feature if you have "Enhanced measurement" turned on in your Data Stream options. Google will also start tracking pageviews, and you will get double hits on the same page.
If you need both features, turn off the "Page changes based on browser history events" options in the pageviews advanced settings.
If you are using VueRouter inside your application, you can simply pass your router instance, and the plugin will start tracking all your pages automatically
import { createGtag } from "vue-gtag";
import router from './router'
createGtag({
tagId: "GA_MEASUREMENT_ID",
pageTracker: {
router,
}
})
By default, the tracking system uses pageviews with the following template.