Best way to count page view in Plone

后端 未结 6 538
名媛妹妹
名媛妹妹 2021-01-13 15:00

I\'m working in a case require fairy complex use of page views.

Each content object will have page view, and this should be accessed easily so that we can do various

6条回答
  •  执笔经年
    2021-01-13 15:21

    We have used an external log analyser for a client project (a large private intranet). Architecture:

    • A js library adds a 'web bug', an empty gif with additional query parameters, loaded from a dedicated nginx server.
    • A log processor picks up the nginx logs, rotates them, and parses the lines into a database, counting access together with the additional metadata. The entries in the db include the UID of the content, among other interesting angles.
    • The site has read-only access to the same database, to make stats queries.

    Page counts are then easy, just query the database for the right UID. Ranked lists are not much harder; query the statistics, then use the UIDs to attach catalog data to the result set.

    The biggest problem we face now is a lack of data warehousing know-how (turning individual access rows in the database into efficient aggregates), and we are looking into retooling this setup to use Piwik as the statistics engine instead.

    We cannot use Google Analytics in this particular case, but if you do not have such a restriction, I'd certainly would advise you to look into collective.googleanalytics and see if you can make it fit your use case.

提交回复
热议问题