January 31, 2012
Have you ever wondered how an ExpressionEngine site decides how many guests and visitors you have at any given time? What about the way it tracks those stats over time? At the bottom of forum pages, and in the old default templates EE installed, you often got a little blurb like this:
The most visitors ever was 1154, on August 26, 2009 03:45 PM Total Logged-in Users: 1 Total Anonymous Users: 0 Total Guests: 55
So, what does that information really mean and how is it calculated? There is only basic documentation on it from EllisLab, so here’s the inside scoop in full technicolor detail, taken directly from the code for EE 2.3.1:
Every time EE builds a page, whether that page is cached or not, ExpressionEngine updates its stats. But wait… it’s already a little tricky: this assumes you have “enable_online_user_tracking” set to yes. You probably do.
When ExpressionEngine updates its statistics (the magic happens in /libraries/Stats.php), EE takes a look only at activity from the past 15 minutes. (There is no way to change this time period except by hacking the core—so your site’s stats are going to be compared on the same scale as anyone else’s EE site, unless they are sooper-l33t.) Information about current online visitors is kept in a table called “exp_online_users”. Old entries get cleaned out approximately every 20 page views, but regardless off the table’s state, visitors will never be over-counted even if the table hasn’t been cleaned, because the 15-minute span of time is enforced by each database query for online users.
Interesting side note and possible bug: You might have “dynamic_tracking_disabling” enabled to help with large traffic spikes. This setting says, if there’s too much traffic, you want EE to disable tracking to speed up your site. But ironically, once you hit that certain amount of traffic, this setting means you will stop updating the “exp_online_users” table. In other words, you won’t keep tracking that you have large amounts of users, which means EE will soon think there are fewer users, and then you’ll start tracking them again.
In any case, assuming you ARE tracking stats (and therefore users) at this point, EE looks at the current entries in the “exp_online_users” table, and sorts them into: “logged-in” people (public and “anonymous”) and “guests”. A guest is considered a new person if they are visiting from a particular unique IP address. So, multiple people from one office sharing one IP address, count as one guest—until they log in. And people who don’t specify an IP address or who spoof one—it’s possible—count as one unique visitor.
Meanwhile, a single search engine crawler that connects from 10 different IP addresses or a person behind a proxy with 10 rotating IP addresses, look like 10 guests, assuming all visits happen within 15 minutes.
Important to note: if you log in to a site, you were probably counted as a guest, and you now count as a logged-in user. When you log in via the control panel, nothing removes the guest version of you until 15 minutes expires (but if you log out, you are removed as a logged-in version of you). If you log in or log out via the forums or the member section of your site, this cleanup does happen, so it’s likely it’s a very small issue in your site stats.
So, that’s members and guests. What’s an anonymous user? That’s someone who has logged in, but who has selected to be “hidden” from the list of people online—this is only the case if you have made that checkbox available on the login screen and they have checked it. Anonymous users are not counted as guests. (Anonymous users are visible to superadmins who see all and know all.)
If the number of guests and the number of logged in users (public and anonymous) all together is the largest amount it’s ever been, the “exp_stats” table is updated with your new “high score” and the current time. But if it’s not, “exp_stats” is still updated, with only the “last_visitor_date”. This happens on every page load.
Side note 2: If you’re logged_in, your own profile will update the “last_visit” information for your own account, whether or not stats are turned on, from somewhere else in the code. So it’s possible to have members with more recent last visits than your site’s last visit, if you’ve disabled tracking. Be aware.
Last facts: There’s no way to reset your site’s stats without directly accessing the database. And statistics are tracked on a site-by-site basis, so if you’re running Multi-Site Manager, visitors to one site are not counted with visitors to another (but the table is cleaned for all sites at once).
And that’s how total guests and most visitors work in ExpressionEngine.
Posted by Travis Smith at 9:38 AM | Comments (0)
January 30, 2012
National Park Central Reservations is a fresh, modern take on how to plan and book an adventure across North America’s national parks. This project highlights are many:
* Large, spectacular images of the parks accent the header of the site.
* The homepage illustration changes dynamically to represent the park currently selected in the reservations area.
* On the reservations page, a floating ‘booking’ digest summarizes the trip details for easy visualization of your reservation.
* You can’t see it, but we’ve provided easy access to the site’s editors to add and edit new content for each venue; we generate the map automatically on the sidebar as well as the thumbnails for the image gallery.
* Custom promotional spots throughout the site make adding internal promotions or external ads easy.
* The overall design, visual identity and logo were all done by Hop Studios new designer, TJ Garcia.
* We went to extra step to completely secure the control panel and the reservations form.
So, if you’re looking to get away from it all, we know where you should start.
Posted by Travis Smith at 7:50 AM | Comments (0)
January 3, 2012
The Stanford Social Innovation Review is a well-respected journal written for and by social change leaders in the nonprofit, business, and government sectors. It’s full of amazing articles and run by some really sharp and passionate people.
But its site was built in 2006 with an early version of ExpressionEngine, and while it was really well-built for its time, the code was limited in flexibility and overcomplicated by the limitations of the old EE tool. The site’s design also had stagnated.
SSIR wanted to have a site matching what their content deserved: something that showed advanced thinking, leadership, and the depth of the site’s information stores—a site that was a pleasure to browse and a snap to search.
So, we built that for them.
This project involved:
The design had to satisfy a lot of different audiences (internal and external, and the final result is striking without being flashy. Images that were constrained by the previous design—built at a time when monitors were smaller—really get the chance to shine in the new site.
The project took six months from start to finish, and already the benefits are apparent. Traffic is up; user feedback is terrific; and the time it takes to build additional new features is way, way down, given all the new EE 2.x functionality and the new streamlined data model.
This isn’t just a good project, it’s a fantastic example of the kind of project we love to do at Hop Studios. We’ll be showing off this site for years to come.
Posted by Travis Smith at 9:54 AM | Comments (1)
December 12, 2011
Hop Studios’ first-ever PDF ebook “Lying by Sam Harris” is finally completed. The book had been available in another format, but Hop Studios’ new version of the book has:
We’re quite proud of the finished product and I personally enjoyed reading the book myself. Let us know what you think!
The book is available for download at Sam Harris’ website here: http://www.samharris.org/site/full_text/lying/.
Posted by Timothy Garcia at 8:06 AM | Comments (0)
November 24, 2011
So, thanks to the help of Simon Britchford of Objektiv Experience Design, we’re giving Vancouver ExpressionEngine meetup group a reboot.
Come on out this Wednesday, Nov. 30, at The Network Hub downtown, and join us for a talk about all sorts of EE wonderfulness. There will be two free licenses to EE given away at the event, one specifically to someone who’s never used EE before, and one to someone who RSVPed to the event. We’ll also have some EE folks from Seattle coming up; don’t miss this!
http://www.meetup.com/expressionengine/events/40429492/ to RSVP!
Posted by Travis Smith at 7:52 PM | Comments (2)
![]()