3

I want to test my script that send event to Google Analytics via Measurement Protocol. For testing I've created a new account and trying to send the following request using the following template:

http://www.google-analytics.com/collect?v=1&tid=UA-MY_TESTING_TRACKING_ID&cid=XXX&t=event&ec=AAA&ea=BBB&el=CCC&ni=1&z=123456

In Google Analytics reports on events I see nothing (no events at all as well as users and sessions). Now I am wondering if it is because my script is incorrect or because Google Analytics ignores non-interactive hits for users that have no previous "interactive" hits (i.e. hits without ni=1 parameters).

Does Google Analytics allows to see such users or each user must have at least one interactive hit?

sckol
  • 131
  • 2
  • 13
  • I have accidentally created visits only with non-interaction hits via the web tracker (by sending non-interaction events without pageviews) so I'm reasonably sure it is possible. I will try your reproduce the issue on a test account, maybe it's some problem with the measurement protocol. – Eike Pierstorff Dec 24 '15 at 14:25
  • I have to wait till the hits are processed, but at least in realtime ni hits are displayed mostly fine - however they show not up in the "active user" tab, only in the "Events (last 30 minutes)" tab, so there really seems to be a difference in the way they are being attributed to a visit. I'll get back to you as soon as I see results. – Eike Pierstorff Dec 24 '15 at 14:51
  • @EikePierstorff, thanks! Just to be sure: do you send events with cid of user that has never been on your website (more exactly, has never been tracked by your website's tracker)? – sckol Dec 24 '15 at 14:56

1 Answers1

4

I had, for a test, a couple of dozen hit send via curl on the command line, and they were being processed within minutes. CID had been randomly generated especially for the purpose. All hits where being sent with the non-interaction flag. Those were event hits like in the example from the original question.

I have seen those hits in the Behavior/Events report, so they are being properly collected. However "non-interaction" is to be taken quite literally, as they are not used in any session based metric - i.e. if you just send ni-events you will not generate sessions; if you send both interaction/non-interaction hits only the interaction hits will be used in session-based metrics. I am seeing a user count, so strictly speaking the answer to your question is yes, but number of sessions is displayed as zero (likewise for all related metrics).

Makes completely sense, but since the documentation (the last time I read it) talked only about bounce rates when it comes to non-interaction hits I did not think about it this way.

Eike Pierstorff
  • 31,996
  • 4
  • 43
  • 62
  • The problem is solved, I had errors in my script. The logic you've described really make sense: you see users but not sessions (as soon the hits are non-interactive). Thank you for your help! – sckol Dec 24 '15 at 15:40