Why is the Channels connection count in the dashboard is much higher than the user counting in Google Analytics?

Google Analytics and Pusher dashboard have different goals, and therefore they were built to measure different things. Google Analytics is a system for marketing insights, the main purpose of which is to give you an understanding of your user's behaviour on your website and purchasing power.

We count each Websocket connection to Pusher. This means that each user could open multiple connections, for instance, by opening multiple tabs. Also, if your Channels implementation is different from the one that we recommend, each app could open multiple connections. For more information, please refer to "how connections are counted" article.

Here are some general points which explain the differences between Pusher and Google Analytics tracking:

  1. Google Analytics uses sampling (probably not the case for you if your numbers are low)
  2. One notable thing about GA sessions is that after 30-min of inactivity the session is closed. With Pusher if the tab is inactive and user not interacting with your website, the WS connection remains unless you specifically disconnect inactive clients yourself.
  3. Google Analytics uses Cookies to track people, that means that multiple open tabs will be counted as one session. Pusher tracks connections each time a Pusher instance is created, which means that when multiple tabs open you'll have multiple open connections.

If you do not use Authorized Connections feature and see a huge increase in connections without changing anything in your code, it could be some kind of a DDOS attack.

Was this article helpful?
0 out of 0 found this helpful
Haven't found what you were looking for?
Submit a ticket