setDimension in PluginGoogleAnalytics not work!

setDimension in PluginGoogleAnalytics not work!


I have problem with PluginGoogleAnalytics v2.4.2.0 in cocos creator,the function “logEvent” work correctly but function “setDimension” not work,i not see data of custom dimension on google analytics events.
I’m thing this issue due plugin implement incorrect because custom dimension must be a addition param for a event before send to server,here guide from google:

and used in plugin,i think 2 function not linked dimension to event:
sdkbox.PluginGoogleAnalytics.setDimension(index, value);

So anyone have same problem ? and how to fix ?


PluginGoogleAnalytics::logEvent(“EventCategory 1”, “EventAction 1”, “EventLabel 1”, 10);

The setCustomDimension should be use with setScreenName ?

// Get tracker.
Tracker t = ((AnalyticsSampleApp) getActivity().getApplication()).getTracker(
t.setScreenName("Home Screen");

// Send the custom dimension value with a screen view.
// Note that the value only needs to be sent once.
t.send(new HitBuilders.ScreenViewBuilder()
    .setCustomDimension(1, "premiumUser")

If yes, I think we need to change the

static void setDimension(int index, const std::string& value);


static void setDimension(int index, const std::string& value, const std::string& screenName);


That is an example, not necessarily setScreenName, but it must be added to an event ,screenView…before being sent to the server.Here guide
Custom dimension values can be sent with any Google Analytics hit type, including screen views, events, ecommerce transactions, user timings, and social interactions. The defined scope of the custom dimension will determine, at processing time, which hits are associated with the dimension value."