AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.6K members online now
2.6K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Measurement Protocol hits using UID show up in real time, but not historical reports

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

We implemented direct (curl) calls from our server using PHP. Like my post from a few days ago, both pageviews and events are showing up perfectly in the real time view, but nothing is getting saved to reports.

After some testing, I've seen that using 'cid' makes hits get saved to the reports, but hits using a 16-character numeric 'uid' don't get saved.

I read some similar posts on these boards, so to save us some time:

* This was set up and getting traffic days ago, so there's no chance that we're still within the window that there should not be data.
* I don't have any filters set on the view(s).
* No IP filter is set on either of the projects where we're having this issue
* The referral exclusion we had at launch, that probably shouldn't have applied to the server the tracking calls are being made from anyway, was removed days ago
* I have selected the current day in the report range

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Just N
July 2017

Measurement Protocol hits using UID show up in real time, but not historical reports

Rising Star
# 4
Rising Star

Maybe vague is the wrong word.  I'm familiar with that doc and it's been cited for correction.  It's confusing because while it says that there it's contradicted in other places in the help and dev docs that state that the cid is required.

 

I've done many of these implementations, you'll need the cid if you want to see it in your normal views.   If you omit the cid, you'll only see the data in your user id view.

 

Hope that helps.

 

Best,

 

Theo

 

 

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

View solution in original post

Measurement Protocol hits using UID show up in real time, but not historical reports

Rising Star
# 2
Rising Star

Hi Just N,

 

cid is required.   I know some of the documentation is vague on that but it is needed.   You can use uid and cid in the same push.  Harvest the cid and save it in your crm and then pass it back in.

 

Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Measurement Protocol hits using UID show up in real time, but not historical reports

[ Edited ]
Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

The docs aren't vague.  They explicitly state that cid isn't supposed to be required if you use uid.

 

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

Marked as Best Answer.
Solution
Accepted by topic author Just N
July 2017

Measurement Protocol hits using UID show up in real time, but not historical reports

Rising Star
# 4
Rising Star

Maybe vague is the wrong word.  I'm familiar with that doc and it's been cited for correction.  It's confusing because while it says that there it's contradicted in other places in the help and dev docs that state that the cid is required.

 

I've done many of these implementations, you'll need the cid if you want to see it in your normal views.   If you omit the cid, you'll only see the data in your user id view.

 

Hope that helps.

 

Best,

 

Theo

 

 

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Measurement Protocol hits using UID show up in real time, but not historical reports

Follower ✭ ☆ ☆
# 5
Follower ✭ ☆ ☆

I guess it expects you to know that it's only optional in the case of having the optional User-ID feature enabled on the property, and that it's restricted to special views.  Thanks for your help!

Measurement Protocol hits using UID show up in real time, but not historical reports

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Adding my 2 cents, I was using and hardcoded/static cid and events were in the behavior report only for a brief span of time and then disappearing and showing up only in real time report. Made that a dynamically generated UUID and now they show up in the behavior report

Measurement Protocol hits using UID show up in real time, but not historical reports

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

This caused me tons of frustration! The documentation here https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid clearly says that cid is optional. The hit builder here https://ga-dev-tools.appspot.com/hit-builder/ will validate hits that do not have a cid. 

 

Despite this when I sent hits from the hit builder with a uid but without a cid they did not show up on my analytics property at all! The documentation is extremely misleading.