Sitata / titanium-google-analytics

Google analytics for Appcelerator Titanium
MIT License
92 stars 47 forks source link

Custom dimensions #32

Closed annakozy2011 closed 9 years ago

annakozy2011 commented 9 years ago

I am having trouble with specifying custom dimensions.

I do this:

Ti.App.Tracker.trackEvent({ category: "testcategory", action: "test/trackevent", label:"testlabel", value: 1, customDimension:{ 1:Ti.App.getVendorId(), 2:Ti.App.idcliente } }); I can see "testcategory", I can see action and label - but I cannot find any custom dimensions in Google Analytics.

Am I maybe mistaken of where I search for them?

PS: I have found more information how to configure custom dimensions. Is the code above correct? Do the keys of "customDimension" array have to be integer or string? Is it necessary to have custom dimensions configured in the project before I can see any input?

annakozy2011 commented 9 years ago

Sorry, it all works fine.

deckameron commented 8 years ago

@annakozy2011 I am experiencing the same problem. How did you solve it? Thanks

annakozy2011 commented 8 years ago

Sorry, I don't remember now. It was almost a year ago and I have not seen that app for at least half a year.

annakozy2011 commented 8 years ago

I have it like this in that app, and according to my comment, seems like it worked back then :

Ti.App.GoogleAnalytics = require('analytics.google'); Ti.App.Tracker = Ti.App.GoogleAnalytics.getTracker(GA_key); Ti.App.Tracker.setUser({ userId:Ti.App.getVendorId(), category: "icatalog", action: "start", customDimension:{ 1:Ti.App.getVendorId(), 2:Ti.App.idcliente } });

deckameron commented 8 years ago

Thank you @annakozy2011 ! My code looks exactly like yours but my Analytics Dashboard shows nothing... This is really odd!

annakozy2011 commented 8 years ago

Maybe there is some trick in the setup of analytics, but I don't have the password to that account now, nor do I remember how I eventually managed to see it.

deckameron commented 8 years ago

I see. It´s been a long time. :) Thank you for your reply.