Expand my Community achievements bar.

SOLVED

How to send events / numeric evars from Android SDK

Avatar

Level 1

Hi,

I encountered the following problem:

When using the Android SDK I would like to send the user's individual game score as a numeric value together with an action.

So in Android I normally use

  1. HashMap cdata = new HashMap<String, Object>();
  2. cdata.put("myapp.evar.game_score", 12345);
  3. Analytics.trackAction("myapp.action.game_score_changed_action", cdata);

The eVars are created in the web dashboard. This work nice for a defined set of values, but doesn't work very well for numeric values.

I would like to apply a filtering like "greater than 1500" but this is not possible like this since every value is just a string.

How is it possible to track these numeric values?

I've read a lot in the documentation and assume it could be some kind of events with

cdata.put("&&events", "myapp.event1=12345");

But I'm not sure about this and have no clue what to create in the web dashboard to work together with this.

Or maybe I should use some kind of counter variable?

How is this done correctly?

Thanks in advance!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Dear

I don't think we can use Numeric Operators on eVars. Someone might has some other ideas, lets wait for them.

Yes, you can bucket the eVars from Client End, but if you need to understand/compare an individual eVar score (Let's say 1250), it is not possible. So i would recommend for Classification!

Thank You

Arun

View solution in original post

3 Replies

Avatar

Community Advisor

Dear

Avatar

Level 1

Dear Arun,

thank you very much for your reply.

I didn't know about the classification rule builder. It's handy to have this possibility.

Although, bucketing by RegEx-ing string eVars is kind of a workaround. It "feels somewhat wrong".

I just wanted to use standard numeric operators.

As alternative I now bucket on the client and just send the bucket keys via eVar.

If there is another approach at sending and comparing numbers I would be happy if you'd let me know.

Thank you!

Avatar

Correct answer by
Community Advisor

Dear

I don't think we can use Numeric Operators on eVars. Someone might has some other ideas, lets wait for them.

Yes, you can bucket the eVars from Client End, but if you need to understand/compare an individual eVar score (Let's say 1250), it is not possible. So i would recommend for Classification!

Thank You

Arun