Jump to content
Graham Quince

Visitor Log - UPDATED 26/06/20

Recommended Posts

visitorlog.png

Here's a new FrogCode widget:

https://www.frogeducation.com/community/frogcode/frogcode-showcase/visitor-log

We worked with George Bligh from Greenshaw on this widget.  When someone views a page with this widget on, it records their visit.  Anyone with Edit and Manage rights gets a button which displays a list of all visitors, their profile, their children (if a parent), how many times they have visited the site and the time and date of their last visit.

screenshot.PNG

(This widget uses the datastore - a little known about feature of Frog's API.)

 

Updates

This latest version 2.2 includes a "copy to clipboard" button, which allows you to copy the whole table and paste it into a spreadsheet program like Excel.

The second new feature includes the ability to alter the Datastore's reference.  So if you wish to reset the log, instead of deleting the widget and adding it again, you can now change the reference and the information will remain stored.

 

  • Like 1
  • Thanks 2
Link to post
Share on other sites
Just now, ADT said:

Another Pconk....  o wait a min...  its a @Graham Quince & @gbligh creation......  it probably won't work then...... :P

To be honest, it was @adamw who put the bulk of the work in, but I'm using it as a roadmap to try an understand the datastore - there seems like there's a lot of potential there.

Link to post
Share on other sites

Actually, just realised it is the api call that resolves uuids into names that is failing.  Can we do it in multiple steps?  Also this probably means we can still get the total number of page hits and unique visitors? Which would be great.

Link to post
Share on other sites
15 minutes ago, pconkie said:

Actually, just realised it is the api call that resolves uuids into names that is failing.  Can we do it in multiple steps?  Also this probably means we can still get the total number of page hits and unique visitors? Which would be great.

Hi

@Adam fixed it last night.  in fact, during the day he had to spend quite a bit of time dealing with my hacked code.  

The new version is ready and available to download. - George got it last night and it finally worked.

Link to post
Share on other sites

Really like this widget - we have it on a number of pages.  But.....

Does this widget record page visits or does it actually record site visits? Not sure which is the designed behaviour, but I think it actually records site visits.  If i'm correct, would be even more powerful if it recorded page visits.

Edited by pconkie
Link to post
Share on other sites

 

36 minutes ago, pconkie said:

Really like this widget - we have it on a number of pages.  But.....

Does this widget record page visits or does it actually record site visits? Not sure which is the designed behaviour, but I think it actually records site visits.  If i'm correct, would be even more powerful if it recorded page visits.

I honestly can't remember. If I get a moment I will look at the code, but I think that it records page visits. More specifically, I think it uses the widget id as the source. So if you put two on a page, they might show different data.... 

I'll have to look into it. You could test this by putting this widget on each page of a test site and visiting it a few times to see what data it shows.

Link to post
Share on other sites
14 minutes ago, Graham Quince said:

I tried testing this and it logs site visits.  If you have two on a site, but different pages, both counts go up.  I tried rewriting it but got nowhere.

I'll be passing the site_uuid to the data-store, all you'd need to do is pass the page_uuid instead. We can have a play sometime and see if we can get it working.

  • Thanks 2
Link to post
Share on other sites
6 hours ago, Pete Foulkes said:

Morning!

We've put the widget on our Y6 transition site but it doesn't seem to be logging user visits in the 'Other' profile. Admin, staff and students all working fine.

Hi Pete - I'm trying to get an answer for you.

It's probably a permission - but I'm struggling to find it at the moment

 

Link to post
Share on other sites
1 hour ago, Pete Foulkes said:

Thanks Graham, much appreciated.

Hi @Pete Foulkes

Finally got to the bottom of this.  It appears the Other profile was not included in the datastore code and cannot be set to use the datastore, so the Visitor Log will not record their entries.  I'll flag this up with the Product Team and get it recorded as a bug.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By Chris Goluch
      Hi,
       
      I am going to ask a few questions regarding widget development:
      what DB software do you use (mogo, mysql, plaintext)? what npm module is used to manage this database? with out using any thing like frog forms, frog data viewer, csv files, frog documents of any kind. Could I please get access to give my widgets an actual database table? Can we get the ability to read console print outs from the server side code execution of widgets? Can we please get some form of API access for the server side part of EJS templates, mainly for use with databases.  
      Essentially as somebody who has limited experience developing web apps, I find that the current widget system of having to hack in things from locally hosted files, or using the client to connect to a Document based database hosted on 365 is too janky. Client side access for rendering inside an EJS template is exactly what I want but I don't have the tools available to do the really cool stuff I want to do.
       
      In a nut shell you can't watch Doctor Who on BBC one if you have a Television, but no TV channels. EJS is our television but right now we have no decent channels to watch.
       
      I know, I make a post about this every year but, Frog Code seriously needs to start being worked on again, right now we can not even delete our demo widget projects. I think Frog Code needs a road map and a clear plan, or it needs to be removed if you have no plans on finishing this feature.
       
      Sorry to sound like a brat, but I feel this is a seriously huge missed opportunity.
       
      Thank you
    • By Graham Quince
      The brilliant @Simon Law has built a new widget which adds a site's menu to a page, to save us all from having to do this manually using text widgets.
      You can download this from the showcase page:
      https://www.frogeducation.com/community/frogcode/frogcode-showcase/navigation
    • By Graham Quince
      When I posted the snippet to allow you to restyle of My Notes, I hadn't thought that it wasn't as straight forward to change the title of Phrase of the Day. This bit of CSS is the easiest way I've found of changing all Phrases of the Day, although if you combine it with the the technique(?) mentioned in the restyling My Notes, you can restyle individual widgets in the same way.
      <style> .widget_phrase-wrap .header { height:50px; overflow:hidden; } .widget_phrase-wrap .header h2::before { content: 'My own title \a'; white-space: pre; } </style>  
    • By Phil Stiles
      Hi, I am trying to create a widget that is able to pull the Total Positive Behaviour Points into a variable, the end result is we will use an if statement to display a specific image depending on a number of points the student has.
      I have started by testing with the HTML widget. using the below code to see if I can use the behaviour.getBehaviourTotals API to get the total points this year for the user, however, it is not working.
      <script> var $ap,user; //Create a div, and give it a unique ID $ap = $("div", { id: Frog.Utilities.generateSimpleID() } ); $ap.html( '<b>Your House Points:</b>'+ '<table clase="table" id="your_points">'+ '<tr>'+ "<th>This Year</th>"+ '</tr>'+ '</table>' ); // Use Frog's API to get the logged in student user = FrogOS.getUser(); // Use Frog's API to get Behaviour points Frog.Model .api('behaviour.getBehaviourTotals',{ Student_uuid: user.uuid, }).done(function(behaviourResponse){ behaviourResponse.data.pos.year(function(work){ $ap.find('tbody') .append( '<tr>'+ '<td>'+ data.pos.year+ '</td>'+ '</tr>' ); }); }); arguments[0].append($ap); </script> any advice appreciated.
      Phil
    • By ann
      Hi
      Is there any way I can get a nested page to be centred on a page?
      I have created a number of pages with three equal columns - each one has an text widget containing an icon image linked to various places. Each of these 3 column pages are then nested onto one page.
      It looks fine on a PC as all three columns show across the page  but on a phone it justifies to the left.upsetting the design. 
       
      Thanks
      Ann

×
×
  • Create New...