Last updated
Last updated
Default plugin installation properties. All properties can be modified using the helper method
Changes to the gtag can be done only during plugin
Type: function
The useState
method returns the plugin default state properties as single ref
. This is useful in case we want to add/edit all plugin options outside the plugin install snippet or if we simply want to retrieve its properties and render them in a template.
Type: function
Tracker router default options:
Type: function
The useGtag
method returns all vue-gtag methods.
config
event
customMap
disable
exception
linker
pageview
screenview
purchase
query
refund
set
time
it is also possible to simply export the methods from the package itself
Type: Boolean
Default value: false
When true
the plugin is able to collect data and push the inside the dataLayer, but it doesn't mean that the gtag.js script is loaded yet.
Type: Boolean
Default value: false
When true
the plugin is fully bootstrapped: the data is collected and pushed inside the dataLayer and the gtag.js script is fully loaded.
Default value: plugin
Using , will help you connect the plugin to your VueRouter instance and start tracking page changes automatically. This method accepts the VueRouter instance as first parameter and options as second parameter.
If the method you are looking for is not listed here, you can use the method which directly queries the gtag instance.