Letting Popular Content Bubble Up

|
Content Author:
Hannah Schultes
Letting Popular Content Bubble Up Cover

How Pageviews work to feature your most popular content automatically

Sites+ is the platform that runs the websites we build. One of the benefits of Sites+ is its flexibility in adapting to new needs as they arise.

We've built in commonly requested features so that they don't need to be recreated for each new client. Things like news, events, blogs, and resources can be enabled by our team on any site with the click of a button.

However, it's common for clients to come to us with unique content requirements. Sites that regularly produce content, with a specific set of fields, that don't fit into the pre-built features can request a custom content type. Our team then develops a new form for creating this type of content with all the required fields based on the client's needs. This allows website editors to develop a consistent display of their content easily. It is also helpful for sites with multiple content creators because it keeps everyone's content uniform.

Custom content example: encyclopedia article

Our client wanted to create a digital encyclopedia to serve as a knowledge base for their website visitors to reference. The fields for each piece of content are the title, topic, authors, body, summary, tags, related month, thumbnail image, a last reviewed date, and a pageviews field (hidden). Below is a screenshot of the custom content type we created for them and each of the fields that need to be filled out to create a consistent piece of content each time. The fields are highlighted with a blue box.

Screenshot of custom content type form display

Custom view: sorting your content

Another benefit to our platform is that it allows us to fine-tune how the content is displayed to website visitors.

"How do you want the content to be sorted?"

This question was recently posed to me during a major website overhaul for one of our highest-trafficked websites. We wanted to be sure the most important content to our visitors was getting the highest amount of impressions, or potential views.

Standard sorting options typically include sorting by creation date, alphabetically by title, or by the last updated date.

For most content, sorting alphabetically or by creation date works well. Visitors expect encyclopedia articles to be sorted alphabetically by title or topic and news and events to be sorted by date.

But what about more timely content? Content that is evergreen, so it doesn't expire, but might be more relevant to visitors in specific months or years compared to others. For this type of content, you'd want to sort by popularity, or pageviews. Our analytics system keeps track of the number of views each web page receives.

Making something like this work meant creating a closed loop between the analytics platform and the Sites+ website. We already had the website feeding data to our analytics platform. Can the analytics platform then feed information back into the website so that the website knows about its own analytics?

Here's how we tested this concept:

  1. Adding a "Pageviews" Field: We began by adding a field to each page on the website to store the number of visits over a 30-day period. It isn't a field we want people to manipulate, so it is not visible but it is there.
  2. Write Code for Matomo that Queries for URLs and their Corresponding Pageviews: Matomo is our analytics platform where we can track the number of views a piece of content gets. We wrote code to examine each page (URL), find the matching path on a website, and then update the pageviews field with the pageviews value from Matomo.
  3. Reset the Field Each Month: How often should pageview values be updated on a page? Daily? Weekly? We decided that monthly was the correct resolution for the trends we were after. We added code to zero out the field each month, then allowed it to repeat step 2 and fill the pageviews field with updated numbers from the previous month.

The final step was to curate the list of content for the visitors to view using our specified fields: related month (so that's it's first relevant to the time of year people are searching) and pageviews (sorted by highest value). 

Visitors see a list of "Popular Resources," followed by 5 linked titles to each piece of content:

Popular resources screenshot

What this means for Sites+ users:

If you're using the Sites+ platform, you can now request to sort your content by popularity, or pageviews. That means a list of popular content can be updated automatically and accurately.

Contact the CALS/LAS web team at websupport@iastate.edu for more information on using the pageviews feature on your site.

Body