Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Will Scott, Quin Hoxie - statistics code

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1924 Views
  • Sam
    Avatar
    Administrator
    679 Posts

    Will Scott, Quin Hoxie - statistics code Link to this post

    Hi Will & Quin,

    Will: you're working on a Google Analytics plug-in
    Quin: you're working on a custom reporting system of some kind

    It would make sense if your APIs were structured in similar ways where appropriate. For example, using similarly named methods to activate the various analytics engines.

    Can you please discuss what both you're up to on this thread?

  • Will
    Avatar
    Google Summer of Code Hacker
    7 Posts

    Re: Will Scott, Quin Hoxie - statistics code Link to this post

    So, I'm planning on doing two things that are of interest here.

    First, Google Analytics is a good, free analytics tool, so there should be a simple way to add it to your site, i.e. there needs to be a painless way to paste in the javascript tracker google provides in the admin interface, and have it show up in the footers of all of your pages.

    Secondly, I'm going to try to add some usage tracking code. My plan right now is to beef up the session class to keep some more information of how users and then glean some information of how the site is being used from that. I've got other stuff I'll be working on before that, but when I get to that point, it's probably going to both make the most sense, and be pretty neat to display that information with Quin's reporting stuff.

    I glanced at the trac system, and I'm not sure if this is an issue, but if we're both going to be adding code to all pages (I'll be adding analytics snippits), then that's another place where we should have one method in Page.php to do that in, because that's a file that we want to keep simple and clear.

    Thanks,
    --Will

  • qhoxie
    Avatar
    Google Summer of Code Hacker
    39 Posts

    Re: Will Scott, Quin Hoxie - statistics code Link to this post

    For my reporting implementation, I am going to provide a system to generate a statistics report based on nearly anything worth tracking in the framework.
    Ideally, items can be viewed in summary and detail as individuals, and then trends can be shown with comparing two or more items.
    Most all data in the system will be displayed with graphs, tables, and then able to print or export to csv.
    This data will all be available through the cms, but there will also be means to make certain parts of the reports available as part of the public site.

    One thing that I can see right away would go together well would be the addition of the Google Analytics option in the Statistics tab of the cms. If that suits you, of course.

    Also, in response to your comment about page.php. I asked Sam about basically the same thing, and he suggested that I use contentcontroller.php for those needs. I figure that aspect of our implementations should be unified, so does contentcontroller work for you, or should we hash out other options with the mentors?

  • Will
    Avatar
    Google Summer of Code Hacker
    7 Posts

    Re: Will Scott, Quin Hoxie - statistics code Link to this post

    Sounds good on both points!

    The Google analytics stuff should be a pretty minor code insertion, so once it looks like you've got the statistics tab set up I'll go ahead and add that bit in.

    contentcontroller.php looks like a very reasonable place to add in custom scripts to pages. I'll whip up a method for adding extra header/footer code to pages over the weekend.

    --Will

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Will Scott, Quin Hoxie - statistics code Link to this post

    Yeah, Page.php isn't part of the SilverStripe core - it's part of your customised site. It's there for developers to put site-specific code in.

    Nothing in the mysite folder is "part of SilverStripe", if you get what I mean.

    1924 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.