can't get custom Dimension Value Google Analytics Android -


i'm using code setting custom dimension

tracker.send(new hitbuilders.screenviewbuilder()   .set("&cd", "home screen")   .build() ); 

also tried :

 mtracker.send(new hitbuilders.screenviewbuilder()                         .set("&cd1", "premiumuser")                         .build()         ); 

and getting value :

 mtracker.get("&cd1"); 

but nothing work ,i have no idea how current set value dimension. used alot of resources nothing works. followed steps setting custom dimensions in account. ideas?

your code sets custom dimension single hit , reads tracker object. that's reason reads don't work.

assuming want add "premiumuser" custom dimension subsequent hits, , dimension index 1, code should follows:

mtracker.set("&cd1", "premiumuser"); 

then should able read tracker object:

mtracker.get("&cd1"); 

you can find documentation tracker here.

as side comment, if need set custom dimension single hit, there different method in hitbuilder recommended purpose:

mtracker.send(new hitbuilders.screenviewbuilder()                     .setcustomdimension(1, "premiumuser")                     .build()     ); 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -