Saturday, May 11, 2013

[android-developers] google analytics custom dimension not preserved

Hello all,
I'm setting a custom, user scope dimension in google analytics. I'm setting its value in two places: at the entry of the application and just before one event is fired (let's call it "favourite"). Unfortunately dimension behaves like it was hit scope, instead of user scope. I see it sent (in logged urls) only for the event "favourite" but not for other events or activity views.
This is the code I'm using:
Tracker tracker = EasyTracker.getTracker();
tracker.setCustomDimension(1, "wro");
Map<String, String> event = tracker.constructEvent("historydapter", "favourite", "", (long)index);
tracker.send(ModelFields.EVENT, event);
EasyTracker.getInstance().dispatch();

here I see wro in the url. However this
Tracker tracker = EasyTracker.getTracker();
Map<String, String> event = tracker.constructEvent("welcome", "history", "", historyElementType);
tracker.send(ModelFields.EVENT, event);

sends the event without "wro".

I prefer not to call setCustomDimension before every event or screen view since "user" scope should give it to me for free.

Using latest android analytics v2 beta5.

All helps is very welcome!

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate