13
votes

I have a problem with setting up & showing Google Analytics Custom Dimensions. I have successfully setup a dimension in the web interface called "Client" In code I am sending a view properly like this:

    [tracker setCustom:1 dimension:@"Client"];
    [tracker sendView:@"my view"];

GAI dispatch says that data has been sent successfully. But when I try to view my data in reporting - Screens tab and apply "Client" dimension. All my data disappear from table saying "There is no data for this view." Also there are some bugs when switching number of rows per page.

Anyone who has custom dimensions successfully applying, how you do that?

2
Did you ever find the solution to this?Ser Pounce
I am having the same issue with the Android library. I can see that the custom data is set in the logs, but I can't limit the data to only hits with the dimension set. I get the same "there is no data for this view"karl

2 Answers

1
votes

Did you define a segment with a condition that matches your dimension value? It did the trick for me.

See this guide for creating segments: https://support.google.com/analytics/answer/3124493?hl=en

You can select the segment you've created in the reports, and if the dimension was set correctly and GA received data correctly, then your segment should show hits.

Note that you might see data with a delay of a day or so.

0
votes

I just did some Google Analytics development recently, for SDK 3.0, but I was struggling as well with the custom dimensions. One important thing to note is that custom dimensions are set once, and then with all the calls they are automatically passed, so you can set them when you are initializing all the Google Analytics classes.

Is also important to note that in your example you are saying that the Custom Dimension with key 1 will have the value Client. So in your backend you should see for the key "Client" the value "Client", considering that the "Client" key corresponds to the value 1.

Have you tried the debugging of google analytics, so you can be sure you are sending the right URL?

For more help, can you give us a screenshot of the backend where you defined the custom dimensions? Is just a flag you have to enable, as you can see in this page: https://developers.google.com/analytics/devguides/collection/ios/v2/advanced#testing