We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10525
    • 247 Posts
    Any suggestions for the best ways to present basic analytics data to web clients?

    I have a website with a set of custom admin pages in the web context. A user is set up with login access to these admin pages (but with no access to the manager context). I want to provide basic analytics to this user.

    I don't want to provide login access to my Google Analytics account.

    The options I am considering are:

    1. An automated weekly email with a report (attached PDF or link to a web page).
    2. A custom admin page containing up-to-date analytics which can be accessed any time.
    I have looked into several MODX extras:

    • Big Brother 1.3.0-pl (Jul 12, 2015) by lossendae - works, nice output but appears to be only available in the manager context? (dashboard widget + custom manager page).
    • Google Analytics 2.0.1-pl - listed by google, but not in https://modx.com/extras/. Now unavailable?
    • Analytics 2.0.1-pl (May 28, 2014) by yogooo - tried this but currently got no further than an error:
      Fatal error: Class 'Analytics' not found in /var/www/vhosts/mydomain.com/httpdocs/core/xpdo/xpdo.class.php on line 1220
    • Google Analytics Dashboard Widget 1.0.5-pl (Jun 12, 2015) by sterc - this works and appears in my manager dashboard. Very limited documentation. Can it be used to present data in the web context? Or produce reports which can be delivered by email?
    • sekSiteTools.google.analytics (seksitetools-0.0.2-BETA) by Stephen Smith - asks for google 'account number'. Tried with my tracking code. Nothing. looks pretty old; anybody used this?

    These all access Google Analytics. Would I be better just using Google's Analytics Embed API? Anybody tried that in MODx?

    Alternatively, any suggestions for other options which use server logs to generate traffic stats?

      • 3749
      • 24,544 Posts
      I'm not familiar with any of those options, but if you can get the stuff you want to convey on a web page, I would use Notify to send the user a link to the page (I think you'll also need Subscribe). Once you've set up the Tpl chunk, you can send the message with the link in a couple of clicks.

      You could also use EmailResource or one of the other newsletter extras to send the whole web page with all its data in the email.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 10525
        • 247 Posts
        Thanks Bob.

        I am now on Day 4 of doing battle with Google's API, OAuth2 etc to try and do this myself. The docs look great, but once you start to follow them they are as bad as anything else... Same old smiley
          • 3749
          • 24,544 Posts
          I've never used Google's API, but I'd bet that it's better than Facebook's API. wink

          I'm currently wrestling with MailChimp's V3.0 API and that's no fun either, though I think it's better than the Mandrill API.

          Good luck. wink
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting