Why there is huge difference in Pageviews tracking number on discourse admin dahboard and on google analytics

Hi,
I found there is huge difference in google analytics pageviews number and pageviews number on admin panel of discourse.
On discourse’s dashboard it is showing 10,000 pageviews however on Google Analytics its only 100. Can anyone please let me know what could be the reason for such a huge difference in tracking of two systems?

I have configured Google Analytics script by putting up ga tracking code @ Admin -> Settings -> Basic Setup

You will have to ask @sam but I think we should avoid calling it page views for this reason.

Also, are you on the latest beta version?

2 Likes

Can you confirm you are on latest and please supply some screenshots.

1 Like

Thanks @codinghorror and @sam for your quick attention on this

Yes I am on latest beta version

Here are the screenshots:

  1. I have setup Google analytics code this way:

  2. Screenshots of differences in pageviews b/w Google analytics and Discourse Admin

Discourse Admin (Here I am putting the reference of only yesterdays’s numbers)

Google Analytics Page Views (Here I am putting the reference of only yesterdays’s numbers)

Well, that kinda makes sense. Analytics is tracking sessions (full loads) while Discourse is tracking every “page” transition (so someone clicking a topic, going to latest, that same topic again gets counted as 3 to Discourse and 1 to GAnalytics).

4 Likes

I’m changing this copy immediately to “API Requests” because having it be titled “Page Views” is going to be an unmitigated support disaster if it releases in 1.2 that way.

cc: @sam

4 Likes

@riking I can understand your point but not every user follow that behavior of visiting the same topic again and again, I completely agreed there will be a differences between between Google analytics pageviews and Discourse pageviews numbers but that differences can not got 10 times higher then google analytics numbers

1 Like

Analytics is tracking page views, we issue a page view per request, @codinghorror I do not think we need to change copy here, it is not api requests, api requests are way way way higher. In fact, the same code that tell google we had a “page view” tells discourse we had a page view.

I will add a verbose logging option so people can debug if they wish.

2 Likes

I don’t care what it is called, but it CANNOT be called “Page Views” or anything remotely close to that.

2 Likes

I agree you will have a nightmare if you use those terms…

… but just to mention you might want to update these terms in your sales literature

4 Likes

We will, once we figure out values. Right now those are 100% unenforced in any way.

4 Likes

How does this work with the ‘endless scrolling’ ?
You’ll have multiple requests to get new posts when someone scrolls down in a topic, but Analytics is seeing this as one page, AFAIK.

1 Like

Our tracking code only counts “1 API request” for a topic view weather you scroll through a 1 million post topic or not.

terminology is bad here and we will get it fixed.

4 Likes

Hmm, API Requests doesn’t seem very human-friendly. Why not “Topic Views”?

1 Like

That’s by design at the moment because we have no damn clue what we are measuring until we get a lot more data. We want people to ignore this stat.

6 Likes

Yes, in that case terminology is definitely bad :smile:

But for hosting it does matter if you access a 1 million post topic, because you will get thousands of (actual) API requests. We’re facing the same issue, we were counting actual API requests but Analytics says it’s much less because they’re counting ‘human’ pageviews.

1 Like

Only a thought made in utter ignorance.

Might it be possible to have a page-view be counted at the point where the non-js view does a “next page”?

2 Likes

That’s one thing I was concerned about if I was to move to the business package.

Like I have 44,123 page views on the discourse admin page in the last 7 days alone, when the site isn’t really that big, would hate to have to jump up to $1k/month for it when it’s not that big yet.

That and plugin installation would be the deciding factors for me personally to get on the business package over self-hosted.

We don’t know if these are “Page Views” yet, we have no idea what they are until we get some baselines for about 30 days against all the sites we host.

And the communities will be happy to provide the statistics data for the team.