Will Jonas
Will Jonas

Reputation: 41

hitnumber sequence in Google Analytics data

I'm pulling data out of Google Analytics Premium and trying to report on the sequence of pages that a specific user looked at within one session.

The query I used is:

SELECT fullvisitorID,visitid,visitnumber,hits.hitnumber,hits.type FROM 
(TABLE_DATE_RANGE([mydata.ga_sessions_], 
                TIMESTAMP('2014-04-25'),timestamp('2014-05-26')
               )) where visitid=123456789;

The results show me the following hit types:

Hitnumber: 1 Hit type: page

Hitnumber: 3 hit type: event

Hitnumber: 4 Hit type: page

Hitnumber: 5 Hit type: event

I found it odd that hit number 2 was missing from this result set. I saw other visits where the hit counter jumped from 2 to 16 with nothing in between. I'm not filtering on any hit types so I couldn't figure out why I wouldn't see everything in sequence. The total hit count for the above results is 4 which is consistent with the results, but it would be interesting to know why hitnumber 2 is skipped.

Any thoughts/ideas would be appreciated.

Upvotes: 4

Views: 2621

Answers (1)

hoggkm
hoggkm

Reputation: 280

After looking at our own Google Analytics Raw data in Big Query, I Have noticed the following things:

  1. The same hit number can be reused for a single visit. It looks like the logic is as follows: If hits.isInteration is equal false and the next hits.isInteration is also equal to false, it will have the same hits.hitNumber
  2. Not that this necessarily matters, but in the raw data, sometimes the hits.hitNumber for every record isn't in order (in the raw data). This is because the raw data is ordered by hits.time. It intrigues me that somehow hits.hitNumber can be assigned out of order based on hits.time.
  3. I was not able to find any of the same example you provided in our data to make a conclusion on why that might be happening. If I had to venture a guess, it would have to be either due to data loss when transferring or maybe you are using a view in Google Analytics that has a filter on it when collecting data.

Would be very interesting to know what some of the Big Query Developers have to say about it.

Upvotes: 3

Related Questions