Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

It's possible to configure a custom dimension at Tracker level?

I want to set a user scope dimension in Google Analytics using the SDK v4. The value of this dimension never changes in runtime.

When I created the dimension following this instructions the page gave me this code:

String dimensionValue = "SOME_DIMENSION_VALUE";
tracker.set(Fields.customDimension(1), dimensionValue);

This code is for SDK v3 and doesn't work at SDK4.

I readed this too: Custom Dimensions & Metrics - Android SDK v4. Their solution is to set the dimension EVERY time I send a page view, event, etc. That is mess! This dimension never changes. The sesion or user dimensions change less than the screen name which can be saved at tracker level.

Here my question: Is there a method to set the custom dimensions at tracker level like the Tracker.setScreenName?

like image 726
Brais Gabin Avatar asked Aug 09 '14 12:08

Brais Gabin


People also ask

How many dimensions can a standard Analytics user create?

There are 20 custom dimension slots in a Google Analytics Standard account, and 200 slots in a GA 360 account.

How many custom dimensions are allowed in GA4?

In GA4, you can set up 50 event-scoped custom dimensions and 25 user-scoped custom dimensions per property.


1 Answers

See: https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cd_

So I think it should be:

String dimensionValue = "SOME_DIMENSION_VALUE";
tracker.set("&cd1", dimensionValue); //custom dimension 1
like image 159
Shai Levy Avatar answered Oct 12 '22 13:10

Shai Levy