Siddhpura Amit
Siddhpura Amit

Reputation: 15128

How to work with custom dimension in Google Analytics v3 for Android app

I want to make an app, in which a user can search city names. When city names not found, that city name will be tracked by Google Analytics.

For that I have created a custom dimension by following image in Google Analytics:

enter image description here

and also :

enter image description here

I have the following code in my app when word is not found:

    EasyTracker easyTracker = EasyTracker
                                        .getInstance(mActivity);
                                easyTracker.set(
                                        Fields.customDimension(1),
                                        cityNameWhichAreNotFound);
                                easyTracker.send(MapBuilder
                                        .createAppView()
                                        .build());

But I am not getting the missing city names. Can anybody help me?

enter image description here

Upvotes: 11

Views: 298

Answers (1)

Lalit Poptani
Lalit Poptani

Reputation: 67296

If you want to just check the city names that are not found you can do that by events also.

I am doing in that way only eg:-

mTracker.sendEvent("SEARCH_CATEGORY",
                    "SEARCH_ACTION", cityNameWhichAreNotFound, 0L);

By, doing this you will be able to see the list of cities that were searched and not found in your Google Analytics under Behavior->Events->Overview

Upvotes: 7

Related Questions