I'm seeing numbers almost on a order of magnitude in difference between the total number of sessions served up by HAProxy and the number of Visits recorded in Google Analytics (10x higher number on the HAProxy stats page). Is there something wrong in my configuration or am I misinterpreting?
|
Sessions in HAproxy are TCP sessions. When you open a webpage, you can have 10, 20 or more TCP sessions to download the page and its components (images, css, javascript, etc...). Session in Google Analytics are Visits. When a client visits your page, he/she download all of the components (so multiple TCP sessions) but that counts for one visit (the call to google analytic is done once when the client execute the corresponding javascript). |
|||
|
|
|
You've to take into account that is likely that Google Analytics visits are measured using a tracking cookie, so two different visits from the same user & browser in a given amount of time might count as just one visit, whereas HAProxy total sessions counter is, IIRC, the total number of HTTP connections made to your server, so in the previous example HAProxy will show you two total sessions instead of one. |
|||
|
|