google-analytics-plugin icon indicating copy to clipboard operation
google-analytics-plugin copied to clipboard

setVar not working in 1.8.6

Open fishgrind opened this issue 7 years ago • 5 comments

I am not seeing any variable I set via setvar()

this.ga.startTrackerWithId("UA-xxxxx-1", 1).then(() => { console.debug('Google analytics is ready now; this.ga.setVar('cn', 'as8eknlll') this.ga.debugMode() this.pageAndEventTracking(); }).catch(e => console.error('Error starting GoogleAnalytics', e));

in my debug it shows this:

09-28 19:38:10.094 D/GAv4 (27925): Hit delivery requested: ht=1538156290063, _s=2265, _v=ma12.4.51, a=123740524, aid=com.xxx.app, an=xxx, av=0.0.4, cd=blog, cid=xxx-xxx-xxx, ea=category, ec=xxx, el=xxx, ev=0, sr=1080x1920, t=event, tid=UA-xxxx-1, ul=en-nl, v=1

addCustomDimension() does seem to work just not setVar()

fishgrind avatar Sep 28 '18 17:09 fishgrind

@fishgrind I had this issue as well. You need to include the ampersand in the param: this.ga.setVar('&cn', ...)

sarahtully avatar Jan 25 '19 16:01 sarahtully

@fishgrind I had this issue as well. You need to include the ampersand in the param: this.ga.setVar('&cn', ...)

Awesome will try this thanks for letting me know!

fishgrind avatar Jan 25 '19 16:01 fishgrind

Wow ! Thanks so much @fishgrind , you saved my day !

chilipote avatar Sep 19 '19 11:09 chilipote

@chilipote actually all credit goes to @sarahtully 😀

fishgrind avatar Sep 19 '19 11:09 fishgrind

oops my bad, yes ! Thanks to you both 🤗

chilipote avatar Sep 23 '19 20:09 chilipote