How Google Analytics Collects Data

When Google Analytics Tracking Code (GATC) runs, it gathers information about your website visitors and sends that information to the GA data collection servers.

The information is sent in a request to:
https://www.google-analytics.com/collect

This request is made for every single pageview, transaction, social interaction, tracking, timing, and event.

When processed, Google Analytics strings together the individual actions and associates them with a session.

Example: Universal Analytics request

https://www.google-analytics.com/collect?v=1&_v=j68&a=753537405&t=pageview&_s=1&dl=https%3A%2F%2Fwww.analyticsmarket.com%2F&ul=en-us&de=UTF-8&dt=Resources%20for%20Google%20Analytics&sd=24-bit&sr=1600x900&vp=1583x418&je=0&_u=AACAAEAB~&jid=1528408694&gjid=192180985&cid=1602946763.1549335544&tid=UA-23423231144-1&_gid=1845815927.1549335544&_r=1&z=549945300

Example: GA4 request

https://www.google-analytics.com/g/collect?v=2&tid=G-W82H8S53ST>m=45je4620&_p=102644968&cid=1489945657.1691089601&ul=en-us&sr=1920x1080&uaa=x86&uab=64&uafvl=Not_A%2520Brand%3B99.0.0.0%7CGoogle%2520Chrome%3B109.0.5414.120%7CChromium%3B109.0.5414.120&uamb=0&uam=&uap=Windows&uapv=0.1.0&uaw=0&_s=1&sid=1691096027&sct=3&seg=0&dl=https%3A%2F%2Fwww.analyticsmarket.com%2Fblog%2Fhow-google-analytics-collects-data%2F&dt=How%20Google%20Analytics%20Collects%20Data%20-%20AnalyticsMarket&en=page_view&_ss=1&_ee=1

When Google Analytics receives these requests, the data populates your reports.

Although each URL looks overwhelming, it’s pretty simple when broken down:

  • It’s a request for www.google-analytics.com/collect
  • It contains twenty-ish URL-encoded parameters
  • Each parameter stores a specific piece of information that is either used to populate reports or to keep things organized.
  • Some parameters are only used in specific cases, others are required each time.
  • One of these requests is made each time a User views a page on your website.

Blocked Tracking Issues

Common browser plug-ins like NoScript or AdBlock prevent GATC from loading, or block the request from being sent.

This happens more frequently than you may realize – most Users don’t want to be tracked.

When tracking is blocked, you won’t see those Users in your Google Analytics reports.

The best solution to this problem is to combine Google Analytics with a log analysis tool – Users can’t block themselves from the access log.

Angelfish Software is a Google Analytics Wingman – it sees things GA doesn’t see!

Parameter Analysis: UA

Let’s take a look at the query parameters in the UA request:

NameDescriptionExample Value
vProtocol versionv=1
_vSDK Version number_v=j68
aAdSense linking numbera=753537405
tHit Type.  e.g. pageview, event, item, timing, etc.t=pageview
_sHit sequence number? (unsure)_s=1
dlDocument Location (full URL)dl=https%3A%2F%2Fwww.analyticsmarket.com%2F
ulUser Languageul=en-us
deDocument Encodingde=UTF-8
dtDocument Title (Page Title)dt=Resources%20for%20Google%20Analytics
sdScreen Depth (color)sd=24-bit
srScreen Resolutionsr=1600×900
vpView Portvp=1583×418
jeJava Enabled (0 = no, 1 = yes)je=0
_uUsage info: tells Google which features are used_u=AACAAEAB~
jidJoin ID for DoubleClick beaconjid=1528408694
gjidTracking code versiongjid=192180985
cidClient ID: random-number.timestampcid=1602946763.1549335544
tidTracking ID / Web Property IDtid=UA-23423231144-1
_gidUser ID, used to distinguish users_gid=1845815927.1549335544
_rNot sure (it’s undocumented)_r=1
zRandom Number Cache Busterz=549945300

The parameters shown above are for a pageview (t=pageview).  Different parameters are used with different Hit Types, like t=event or t=transaction.

If you’d like to see the parameters used by GA4, we recommend looking at the
GA4 Measurement Protocol Reference.

Next Steps

Check out our Recommended Tools to learn about products that complement Google Analytics.