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

(Love Chopra ) #1

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

Understand the Dashboard (101 crash course)
Discourse metrics don't match Google metrics
(Jeff Atwood) #2

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?

(Sam Saffron) #3

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

(Love Chopra ) #4

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)

(Kane York) #5

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).

(Jeff Atwood) #6

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

(Love Chopra ) #7

@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

(Sam Saffron) #8

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.

(Jeff Atwood) #9

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

(Dean Taylor) #10

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

(Jeff Atwood) #11

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

(Michael - DiscourseHosting.com) #12

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.

(Sam Saffron) #13

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.

(Michael Downey) #14

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

(Jeff Atwood) #15

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.

(Michael - DiscourseHosting.com) #16

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.

(Mittineague) #17

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”?

(Dylan) #18

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.

(Jeff Atwood) #19

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.

(Erick Guan) #20

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