Google Analytics custom dimensions not tracked right after creating dimensions - google-analytics

I have noticed an odd behavior when working on Google Analytics. I have enabled a custom dimension in an existing installation, and then started sending hits to GA with said custom dimension in it right away. (For clarification, this was a previous custom dimension, which was disabled and set to Product scope; I enabled it, renamed it and changed it to User)
The odd thing is that for a while, whenever I tried to show my custom dimensions in reports, I got an empty list, as if there were no hits with custom dimensions in them - even though I'm certain that they were being sent. However, a few hours after I tried again and I checked that this time around, the custom dimensions did appear in my reports - I could add them as a dimension to my reports and get back some results.
What bothers me is that when I checked the times of the rows I was getting in the report, it appears as though I only got results from the attempts I did several hours after setting the custom dimensions - apparently, the first hits weren't getting any custom dimensions with them.
So my question is - is there a setup period for creating or modifying custom dimensions during which GA will not record the new dimension data? Or could it be that I am overlooking something in my setup? (I'm pretty certain the clients were sending the right data at all times.)

Yes, in my experience it can take up to 3 hours (depends on a lot of factors).
So next time anticipate the need for the custom dimension or just be ready to lose some data.

Related

Two Custom Dimensions appear in collect request, but only one surfaces in reporting UI

I've recently implemented GA via GTM for a MediaWiki site I'm working on. As part of that configuration, I've setup custom events and variables to capture two custom dimensions (one session scope, and one hit scope respectively).
While the data layer and collect requests (e.g., google-analytics.com/collect?...&cd20=xxxx&cd44=xxxx...) show variables being set and sent, only one of the dimensions is surfaced within the GA reporting UI. More specifically, the session scoped dimension appears when slicing session-based reports, but the hit scoped dimension doesn't appear when slicing page-based reports.
Given the setup, I'd expect it would be all or none on the custom dimensions (vs. only one being captured). Has anyone run into this/any general ideas on what may be amiss?
Make sure all expected custom dimensions are properly defined in your property settings. Undefined custom dimensions will be ignored completely.
You always send your data on hit. The session/user/product level dimension is about the post-processing. Therefore, for a session-level dimension, it is enough for it to be set once per session for it to appear for any hit of the session. Hit-level custom dimensions will only be available for the hits that had that dimension explicitly set for them.
Only 20 CDs are available for free GA. GA360 is required for more. Make sure you're sending data to a GA360 property if you want to use the 44th CD.

Metrics and dimensions are not showing up for hits of type 'event'

I have a fully functional and working code (written in C#) which purpose is to track some hits to the specified GA property. This code has been tested and still works successfully. It adds some predefined dimensions (like App Version) to each hit and a several custom metrics to a certain hit types (like event with a certain Event Action).
So far so good everything works flawlessly when taking into account the first property to which these hits are being sent. Also everything is fine when I set up a brand new GA property and track my hits to it - that is, I'm able to see events in Realtime reports, and events show up in custom reports after a while so that I can see my custom metrics.
The issue is that when I try to send absolutely the same hits to the existing property which had been created and configured ages ago - there is no both dimensions (even predefined) and custom metrics in my custom reports. I see these events in realtime and behavior reports, and I'm even able to create a custom report against events count - but that's it. I'm able to use for example Day of the month as a primary dimension, but when I try to use App Version as a dimension or my custom metrics as report metrics - it says "There is no data for this view.".
I've already tried everything I could, have read almost every post about custom definitions in Google and viewed almost each related SO question and answer - still with no luck.
We use measurement protocol
There is a correct User Agent being sent with each hit
17 days has passed since my first attempt to track these hits with existing property
There is no filters and segments at all
There is only one view
For me it looks like a property misconfiguration, but I've inspected each configuration page (I have all possible rights granted) and have not found anything related.
Will appreciate any help with this issue.
UPD: The hit itself (with the sensitive data replaced):
t=event&ec=session&ea=connection_end&el=b225d53a-6bb2-8021-f7b5-ae7004ae0a00&cm1=174960&cm2=1751494&cm3=479033&tid=UA-XXXXXXX-X&cid=4119e77f-be87-4530-04d3-33882f8eea77&v=1&av=XX.XX.99.555&an=my-awesome-app&aid=app.awesome.my
UPD: Here is what I'm trying to achieve (screenshot was made at the test property, where everything works like a charm):

Google Analytics suddenly started Sampling Data, 3k sessions for property over time period

We are using the free level of GA and have been creating reports using Custom Dimensions and Metrics since last summer.
We also use the Google Sheets Analytics add-on to post process data pulled from the API.
Overnight on 16-17 May (UK Time), our reports suddenly started showing as being sampled. Prior to that we had no sampling at all, as our reports are scheduled so I can look back through the revision history to see changes made when the scheduled reports run.
This sampling is occurring in custom reports viewed in the GA platform and in GA sheets. I've done some analysis and it appears to only occur at the point that more than one Custom Dimension is added to a report, or when the GA dimensions ga:hour or ga:dateHour are used (ga:date does not trigger sampling).
All our Custom Dimensions and Custom Metrics are set at Hit level (I've read a post where it was claimed to be due to mixing scopes on Dimensions & Metrics, but we are not doing this).
If I reduce the date range of a query (suggested as a solution on many blogs), the sampling level actually gets worse rather than better.
For the month of May we didn't even hit 4k sessions at property level. I can't find any reference anywhere to any changes being made to GA that would cause sampling to apply to our reports (change documentation, Google Blogs etc).
Is anyone else experiencing this or can anyone shed any light on why this might be happening? Given how we use GA if we can't resolve this then it's a year of work down the drain, so I'm really keen to at least know why this has suddenly happened even if ultimately nothing can be done about it.

"There is no data for this view." in reports with custom dimensions in Measurement Protocol of Google Analytics

Our application needs to gather usage data through the Measurement Protocol of Google Analytics.
We can successfully send "appview" hits to the Google Analytics server, and get a proper response by it (a GIF image). The appview hits appear on the GA Dashboard, along with the country of origin, session duration, etc.
We also have several custom dimensions and metrics that we want track for each hit. We have set those up in the GA Admin panel with the correct scope, index and active state. We have 3 Hit-scoped dimensions, 3 User-leveled dimensions and 1 Hit-scoped metric, all set to Active state.
We send the dimensions and metrics as described in the docs at
Custom Dimensions / Metrics
attached to the hits they apply for, like so:
...&cm1*=3 <--for the metric
and
...&cd6*=15 <--for the dimensions (some dimensions have numeric values, others are text)
The problem is that those metrics and dimensions don't show up in our custom reports: the reports always say "There is no data for this view.". For example, we have a report that has one dimension and one metric, without any filters, set to "Any view". It doesn't matter if the Type of the report is Explorer, Flat Table or Map Overlay, it never shows anything.
There have been several days since the hits were received and appeared in the dashboard, but the reports are still empty. So scratch out any processing lag.
We tried sending "event" hits instead of "appview" hits - again, the hits show up in the Dashboard, but the reports are empty.
We cannot get any useful insights without using dimensions and metrics - so there is no way to get by without this.
Because of reasons too long to describe, we cannot use any of the Google-provided Analytics libraries.
Is there anything else we need to do to see data in those reports?
When using the measurement protocol you need to that the profile is not set to exclude bot and spiders.
Go to the google analytics website under the admin and the settings under the profile in question.
Beyond that check the realtime reports you should see the hits coming in. You will need to wait 24 -48 hours for data to appear in the standard reports due to data processing lag.

How to get only CHANGED data from Google Analytics API?

I'm using Google Analytics API to get the number of page views for each page of my website. In order to reduce the number of api calls, I'm setting an interval for doing this and cache the data on my server. For each api call, I try to get the page views of every page on my site and update them to my database.
Is there a way to get only CHANGED DATA from a specific time stamp? For example, only page views that changed within last 2 hours.
I think it would be a kind of filters (if any) but I could not find it from the documentation here https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters
You could add a filter for ga:dateHour so that it comes back in the last two hours. But the problem is that it takes Google around 4 hours to process the data. So you wouldn't get anything back for two hours ago.
If you want to see data that is that new you have to use the Realtime api https://developers.google.com/analytics/devguides/reporting/realtime/v3/
What exactly is your query currently? If you do ga:date, ga:dateHour, ga:pagepath, ga:pageviews The results will all be returned in one query (not counting next pages), thats a log way to the 10,000 queries per day limit.
On a side note. What do you mean by changed? Nothing is going to change in data previously processed.

Resources