Open potpot59 opened 3 years ago
Hi @potpot59, I might have to add a callback function before the first configuration hit. I think that would fix your issue and you wouldn't need all this
That would be really great, would you offer this on version 1.x? Thank you.
Yeah I'm currently supporting both at the moment. We'll see in the future
Any news?
Hello. I'm also interested in this issue being fixed.
Maybe we can help you somehow @MatteoGabriele? :)
A fix for this would be most helpful for a project I'm currently working on.
+1
Hello, First of all, a big thanks for this plugin which made it easier for us to set up Google Analytics in our Vue project.
I'm using
vue-gtag 1.16.1
withvue 2.6.14
.I'm trying to set a
dimension
(the value is retrieved from the backend) for all queries made to Google Analytics. But I can't do:["set", {dimension1: "MY_VALUE"}]
before the first:["event", "page_view", {page_title: "MY_TITLE", page_path: "/", page_location: "http://localhost:4200/", send_page_view: true}]
I do not perform the
pageview
manually, they are triggered by the router. The firstpageview
does not contain thedimension
, the following ones do.I have tried a lot of things without success, for example:
bootstrap: false
, thenset(dimension)
, thenbootstrap()
...enabled: false
, thenset(dimension)
, thenthis.$gtag.optIn()
...Here is the sample code from my last try:
Output with the Google Analytics Debugger:
Thanks in advance for the help šš»