Forums & Blog

A SmarterTools-sponsored community.
Welcome to Forums & Blog Sign in | Join | Help
in Search

Smarter Stats API?

Last post 09-05-2008 9:21 AM by DotNetWebs. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 01-11-2008 6:49 AM

    Smarter Stats API?

    I am looking to replace our Urchin installation with SmarterStats but i want to know is there any kind of API available for retrieving data from the SmarterStats database?


    The reason i ask is that i would like to be able to pull bandwidth usage data for individual sites for display on our customer portal.

  • 01-14-2008 9:33 AM In reply to

    Re: Smarter Stats API?

    Here is a link to the SmarterTools Help that describes the various APSI calls for SmarterStats.

  • 01-15-2008 3:49 AM In reply to

    Re: Smarter Stats API?

    Hello I am a registered Smarter Stats customer and would also like to be able to be able to integrate the top and recent search engine referral phrases into a page on the Visit Horsham website.
     
    The link to the API calls seems only to provide admin functions rather than usage data for specific sites.
     
    If it is not possible to obtain the data via the API is it possible to query the database directly? As I understand it Smarter Stats is using a flat file SQL database. Is it possible to convert it to full SQL Server database?
     
    Many thanks. 
  • 01-16-2008 4:23 PM In reply to

    Re: Smarter Stats API?

    I have asked this question before and have been advised that the API is for admin purposes only.
    Inserting data, not retrieval.

    It is dissapointing that we cannot extract data even if it meant only being able to setupup Smarterstats to use our SQL DB so that we could extract textual values for now.

    I see this as a core and basic need for many developers/hosts that use this product and if not provided in future revisions will see clients move onto others that do ;-(

  • 01-19-2008 1:07 PM In reply to

    Re: Smarter Stats API?

    paulsid:

    I see this as a core and basic need for many developers/hosts that use this product and if not provided in future revisions will see clients move onto others that do ;-(

     

     

    Completely agree Paul. I would be happy with just a standard SQL DB that would allow me to write my own queries. As you say this is a basic and core need and I for one will certainly consider moving to another solution if this is not possible. 
     
    Would someone from SmarterStats please comment on whether this is at all possible or is being considered as a priority for future releases.
  • 01-19-2008 3:23 PM In reply to

    Re: Smarter Stats API?

    Actually, SmarterStats has had the ability to be queried for bandwidth since version 2.x (see the Statistics.asmx functions.  We added the ability for site data to be queried through web services since version 3.3 in the Query.asmx web service.  These are undocumented, unsupported web service calls, and not guaranteed to stay the same with updated versions, but they do work.

    To enable the use of this web service, and to prevent people from hammering your server, this web service is password protected.  You'll need to load AppConfig.xml in notepad, find the WebServiceAuthorizationCode setting, and put in a password at least 10 characters long.  This password will need to be passed to every call to query.asmx. 

    The query language to use is very similar to sql, but not exactly the same.  An example query is:

      select * from fTopDownloads(1, '2006-01-01', '2007-08-08') order by hits desc

    If you want to get sample query names, to use (instead of fTopDownloads), look in Config/ReportConfig.xml for the QueryName and Default sorts to use.

    Because this is an undocumented web service call, they are also unsupported.  That said, it should be able to fill almost any need.

    Grady Werner
    SmarterTools Inc.
  • 01-19-2008 3:50 PM In reply to

    Re: Smarter Stats API?

    Hi Grady 
     
    Thanks very much for this prompt reply.
     
    When I get a minute I will look at this further. My current requirement is to be able to query search engine phrases and integrate them into visithorsham.co.uk. Is it possible to retrieve the last (e.g 10) phrases or the (e.g 10) most occurring phrases in any given time period for example?
  • 01-28-2008 2:09 PM In reply to

    • jd98
    • Not Ranked
    • Joined on 11-01-2007
    • Posts 2

    Re: Smarter Stats API?

    Hello Grady -

    Thank you very much for this extremely useful piece of information.  Based on your information, I have been able to successfully retrieve some of the data that I require in an automated fashion.  I am having one piece of difficulty however that I am hoping you can shed some light on for me.

    I am trying to retrieve data from fTopPages, specifically the data for a specific page for a given date range.  Following your convention, I have written the following query:

    select * from fTopPages(1, '2007-11-01', '2007-12-31') where URIStemText='/subdir/thepagename.aspx'

    The approach of adding the where clause works sometimes and doesn't work others.  In other words, it locates the page requested and returns the data and sometimes it can not locate the page requested and returns an empty resultset.  The behavior all depends on the page requested, some pages work and some pages do not work. However, when I do not supply the where clause at all, I can locate based on URLStemText the page that I requeste that did not return a resultset.  Additionally, when I use data mining on this same file (using copy paste for the uristem), there is data found.

    Am I doing something incorrectly or is there a better way to filter the fTopPages by URIStem?

    Regards,

    jd98 

     

    Filed under:
  • 09-05-2008 9:21 AM In reply to

    Re: Smarter Stats API?

    Thanks again Grady for the information you provided.

    I have FINALLY got around to using this to provide a sample of out stats on our public website.

    You can see how we have implemented this here: 

     Horsham Statistics

     

    Filed under:
Page 1 of 1 (9 items)