v
v
vue-gtag
Github
Search…
v2
Get started
Migration v1 to v2
Bootstrap options
Auto tracking
Multiple domain tracking
Plugin hooks
API
Opt-in/out
Global namespace
Access gtag instance directly
Debug
Plugin options
Methods
pageview
event
screenview
customMap
purchase
linker
set
time
config
exception
Powered By
GitBook
pageview
send pageviews using the official object structure, just a string or even the router object
export
default
{
name
:
'MyComponent'
,
methods
:
{
track
()
{
this
.
$gtag
.
pageview
({
page_path
:
'/about'
})
this
.
$gtag
.
pageview
(
'/about'
)
this
.
$gtag
.
pageview
(
this
.
$route
)
}
}
}
Remember, this is just an example. check the all API parameters in the official gtag documentation
here
Previous
Plugin options
Next - Methods
event
Last modified
1yr ago
Copy link