0

I've recently integrated the latest release of the Google Analytics SDK for iOS. I'm tracking screen views and trying to send custom variables along.

The only way I figured out I could use to do that is to use setCustom before sending the screen tracking request, like:

[[GAI sharedInstance].defaultTracker setCustom:1 dimension:@"dimension"];
[[GAI sharedInstance].defaultTracker trackView:@"To screen one"];

Using the debug mode, I managed to see the custom dimension sent over with the screen view request:

Body: cd2&ul=de&an=MyApp&_v=asldkajsdlkj3l12kj&cd1=dimension&t=appview&sd=24-bit&cd=To+screen+one&sr=320x480&tid=UA-XXXXXXX-X&v=1&av=alpha+6&qt=16921&z=1029348723498274

under the parameter "cd1".

The problem is: I can't see it anywhere in the dashboard. I've got all the screen views reported, but no custom dimension at all.

Does anyone have a glimpse of what the problem could be?

1 Answer 1

3

After asking in the Google Group, a guy named Dave pointed out the following:

Well, this document:
https://developers.google.com/analytics/devguides/collection/ios/v2/migration

says that custom variables aren't currently supported in the v2 SDK. Custom dimensions are supported, which is what your code above is trying to set. But, to use custom dimensions, this page:

https://developers.google.com/analytics/devguides/platform/features/customdimsmets

says that you need to first define them in the GA admin UI. To explain how to do that, the page links to this page:

http://support.google.com/analytics/bin/answer.py?hl=en&answer=2709829

and, unfortunately, those instructions don't match with reality. I don't have a "Custom Dimensions" tab under the "Custom Definitions" tab--I only have a "Custom Data Sources" one there. So something seems to be out of whack with the instructions or the GA admin UI at the moment--maybe there's beta flux, I don't know. I haven't found any way to define a custom dimension, and I think I've looked pretty much everywhere.

So, to answer your question: to use custom dimensions, you have to set those up in the GA admin UI before using them in your app. Currently, I don't see any way to do that, so I'm stuck on that step as well.

After contacting the support, looks like they fixed the problem and now it's possible to stup the custom dimenstions on the admin panel.

1
  • Hi. So I've set up the custom dimension in the Google Analytics Admin UI. And my code looks like your code above. But I still don't see the value in the Analytics UI. I can add the "Custom variable 1" to a report but I don't see data. Any info on how to display a custom dimension would be great. Thanks
    – Moe Salih
    Sep 14, 2013 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.