Closed avaz-19 closed 9 years ago
As a follow up to this. I just took out my custom dimension and noticed that I'm still not getting logging for this particular report.
The report in question is Behavior -> Events -> Screens. It's supposed to give you a breakdown of number of events for a particular screen. However I'm just getting "no data for this view". I do have screen view events logged for my app as I can view other information pertaining to my screens.
You might want to try making both calls from within the success callback on customDimension
analytics.customDimension(dimension, dimensionValue, function () {
// send event
// send app view
});
Unfortunately because of the code design, I cannot make the app view call from that callback that success callback. I've tried the sending the event from the success callback but I'm still not able to see data for that view.
Have you ever encountered an error like this before? Could this possibly be a bug?
I have not encountered this before. This plugin provides a lightweight wrapper around the native sdks so you may find more details on this referring to the native plugin discussion groups or the measurement protocol docs. When you call customDimension it sets the following parameter from the measurement protocol docs. https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cd_ There is a max size on the dimension value of 150 bytes. Could that be it?
The issue isn't with the custom dimension. I'm actually getting the information for my custom dimension fine. The problem is for some reason I'm seeing data any data under the Behviour->Events->Screens report. That information should be completely independent of my custom dimension.
I solved the issue. I'm a bit of a newbie with Google Analytics. I was sending Screen views but in order to get events tied to a screen, you have to use the set() function (navigator.analytics.set(navigator.analytics.Fields.SCREEN_NAME, screenName)) before sending events. That solved the issue. Thanks!
Great, glad you figured out what the issue was. :)
Hi, I'm trying to use custom dimensions with the plugin and I'm seeing some behaviour in the report and logging that I'm unsure about.
I've created a hit-level scope custom dimension. I would like to log the custom dimension with an event hit (specifically a button press). However what I've noticed in the logging is the custom dimension is getting hit against the button press event and the next event which is a screen view. I'm unsure why this is happening. It might not be specifically related to the plugin but I couldn't find any specific documentation on using custom dimensions with your plugin. This looks to be preventing the GA dashboard from reporting Events per a Screen for me.
My code looks like this:
navigator.analytics.customDimension(dimension, dimensionValue); navigator.analytics.sendEvent(eventCategory, eventAction, eventLabel);
...button triggers a new screen to be loaded
navigator.analytics.sendAppView(screenName);
At a hit level scope, I'm not sure why the custom dimension is being logged against both of those events. My understanding is that it should only be logged against the event hit.
Any thoughts? Am I using the api incorrectly?
Thanks!