css.php

It’s great to quantify your readership, and there are a couple plugins on the Commons (JetPack and Monster Insights) that provide interesting statistics on your Dashboard. The Commons also supports Google Analytics, which is perhaps the most powerful metrics tracker.

Google Analytics

Google Analytics is installed on the Commons site-wide, and provides a wide variety of statistics for individual sites.

In the past we set up Google Analytics “views” so that members receive activity emails on a daily, weekly, or monthly schedule. We will continue to support those legacy setups, but going forward, we provide individual analytics management. This means that site admins will need to set up Google Analytics using their own Google accounts and register the Tracking ID or Measurement ID on their Commons dashboard at Settings>>General.

Google Analytics has extensive ways to measure activity and can break it down many ways, including Page views, Unique Page views, Average Time per Visit, Bounce Percentage, and Exit Percentage. Many kinds of custom reports are possible.

See directions on how to set up Google Analytics and optionally the Monster Insights WP plugin:

Set Up Universal Analytics (aka Google Analytics 2 or 3)

 

Getting Started

This document assumes that you are using an older version of Google Analytics called Universal Analytics (aka Google Analytics 2 or 3). If you are using the newer Google Analytics 4, please use these instructions.

How To Tell Which Version I'm Using

It isn’t easy to tell which version of Google Analytics you are using. If you signed up for Google Analytics before October, 2020, you are probably using Universal Analytics (aka Google Analytics 2 or 3). If you started after that, you are probably using the newer version, Google Analytics 4. The newer version is quite different, and slightly easier to use.

The Commons supports all these versions, but it’s probably good at some point to upgrade, since it is unclear how long Google will support the older version. Follow this link to upgrade from Universal Analytics to Google Analytics 4.

The most important difference in the various versions is the way your site pings Google to gather metrics. The older versions use a “Tracking ID” which has a format like this: UA-XXXXXXXX-X. (UA stands for Universal Analytics). The new version uses Measurement ID which has a format like this: G-XXXXXXXXXX.

Whichever version you are using, your first step is to go to your WP Dashboard, to Settings>>General and enter either your Tracking ID or Measurement ID. Once you do this, Google will start collecting metrics for your site.

Site admins can set up Google Analytics on their sites to gather and analyze site traffic.  A Google account is required. To get started, log into your Google account and go to Analytics – https://analytics.google.com.  You should see the following:

Click on the Sign up button to create a free Analytics account.

Enter your Account Name (free form – can just be your name), Website Name (this is the title of your Commons site), and the Website URL. Since all sites on the Commons are use an encrypted protocol, pick https:// in the dropdown. Typically, your URL will look like this:

 yoursitename.commons.gc.cuny.edu

If you have a mapped site, enter your domain name rather than your Commons site URL.

Pick an Industry Category and Time Zone and create your Analytics account.

For simplicity’s sake, these instructions will assume you have one site, one account, one user, and one property.

Notes For Advanced Users

Some things to know:

  • You can have multiple users on your Analytics account, each with various permissions levels
  • You can have multiple Analytics accounts tied to your single Google account.
  • You can have multiple properties (each with a different tracking ID) tied to an Analytics account.
  • If you want to analyze more than one site, you can either
    • create a new account/new property or
    • create a new property on the same account.

After you have successfully created a Google Analytics account, you should see a screen something like this:

Note the Tracking ID, circled in red. You need to add this to your Commons site so that Google Analytics will know where to get statistics for your property.

Do Not Use The Global Site Tag. This will not work on Commons sites.

Instead, copy the Tracking ID, go to your Site’s back-end, to Settings>>General, scroll down to Google Analytics ID and paste it in. It should have the format “UA-XXXXXXXX-X.” See below:

At this point, Google will start collecting statistics on your site.

Next Steps

Google Analytics can be overwhelming. Here are a couple FAQ to get you started:

  • statistics can be “real time” (i.e. right now) or for a set period of time
  • statistics can be analyzed online or sent via email
  • if emailed, they can be sent as PDFs or as spreadsheets (daily, weekly, or monthly)
  • many “canned” reports are available
  • you can create custom reports if needed, but this requires expertise
  • you will not be able to see data before you plugged in your tracking ID
  • if you remove your tracking ID from your Commons site, Google will stop providing statistics

It is beyond the scope of this document to “teach” Google Analytics.

A Typical Report

Here is how to create a simple “Content Drilldown” report that may provide most statistics that you need. It shows the number of total number page views as well as the most popular 10 pages of the month. (Ten pages is the default, but you can change this to any number.)

We have chosen a specific time duration – February 1 thru February 28. We have chosen to see the analytics by day (rather than week or month). To create a recurring, monthly report, click on the share icon, enter email recipients, frequency, and format.

As you can see, there are many configurations for even this most basic report. For example, you can add another dimension to the report by comparing “Pageviews” to say, “Bounce rates.”

Feel free to experiment with all Google Analytics has to offer.

Help With Google Analytics

There are many help resources available.  Here is a basic video:

 

 

-OR-

Set Up Google Analytics 4 (newest version)

 

Getting Started

This document assumes that you are using the most recent version – Google Analytics 4. If you are using Universal Analytics (aka Google Analytics 2 or 3), please use these instructions.

How To Tell Which Version I'm Using

It isn’t easy to tell which version of Google Analytics you are using. If you signed up for Google Analytics before October, 2020, you are probably using Universal Analytics (aka Google Analytics 2 or 3). If you started after that, you are probably using the newer version, Google Analytics 4. The newer version is quite different, and slightly easier to use.

The Commons supports all these versions, but it’s probably good at some point to upgrade, since it is unclear how long Google will support the older version. Follow this link to upgrade from Universal Analytics to Google Analytics 4.

The most important difference in the various versions is the way your site pings Google to gather metrics. The older versions use a “Tracking ID” which has a format like this: UA-XXXXXXXX-X. (UA stands for Universal Analytics). The new version uses Measurement ID which has a format like this: G-XXXXXXXXXX.

Whichever version you are using, your first step is to go to your WP Dashboard, to Settings>>General and enter either your Tracking ID or Measurement ID. Once you do this, Google will start collecting metrics for your site.

To use Google Analytics, you need to have a Google account.  Follow this link to get started. To set up Analytics, click on Admin in the lower left hand corner of your screen. You should see a screen like this:

 

Important Terms

  • Account – you can have one or more accounts (limit is 100). The only required field is a free form name.
  • Property ID – each account can have one or more property IDs. The only required field is a free form name. You can also adjust the timezone here.
  • Data Stream – each property ID must have at least data stream. This is where you will need to provide your site’s url.
  • Measurement ID – each data stream has one Measurement Id. The format is G-XXXXXXXXXX. In our example below, it is G-WD260E1X2Y

It is a matter of choice how you set up your analytics dashboard. Some members might have 2 or more sites on the Commons and choose to make each an account. Others in the same position may want to just have one account with 2 or more property IDs associated with their sites. Each site on the Commons can have only one Data Stream and one Measurement ID.

Data Stream Setup

At the end of the Property ID setup, you will need to choose a platform. See below. Choose Web.

Once you choose Web, you should see the following screen. Fill in your site’s URL and give your data stream a name. (If you are using Domain Mapping, use your mapped URL, not your Commons URL.)

So now you have successfully created your data stream. You should see something like this:

Connecting Your Data Stream To The Commons

The next step is to add your data stream’s Measurement ID to your site on the Commons. Copy your Measurement ID and go to your site’s WP Dashboard, to Settings>>General. Paste it into the field marked Google Analytics ID:

Your setup is now complete. To test to see if it is working, go to your Commons site and click on a couple pages and posts. Do not leave the site. In another tab or another browser, go back to Google Analytics to the Realtime tab. This tab displays metrics on who is currently viewing your site. You should see at least 1 user. Sometimes it takes a little while to complete the set up. You should see something like this:

 

Here is a video that explains Google Analytics 4 Metrics

 

Monster Insights

This plugin lets you access Google Analytics from your WordPress dashboard. See how to set it up.

 

JetPack Stats

One of the plugins that’s included in JetPack is called “Stats” and it presents readership data in various graphs, in your dashboard, as shown below:

To find JetPack Stats, click on the Traffic tab. The Admin bar has a simple graph showing activity, and when clicked, takes you to full details.

How To Set Up Jetpack

The Jetpack plugin is actually a bundle of plugins that have been developed for WordPress.com.

Please don’t be fooled! All the plugins are free to use. Many times along the installation process, you will be encouraged to pick a premium plan and pay money to WordPress.com for features that will not be available on the Commons. Make sure to choose the free version of this tool when activating Jetpack.

Please note that you will need to create a WordPress.com account to use JetPack. You do not need to have a WordPress.com site. Just register here, get your id/password, and you are ready to activate Jetpack.

After installing the Jetpack plugin on your site in the Plugins area, Jetpack will be added to the Dashboard menu (screenshot, right). Visit this Jetpack area in the Dashboard and go through the process to activate Jetpack.

 

 

When activating JetPack, you will see the various paid options but you do not need to pay for this tool. Scroll down all the way and click on “Start for Free” (image below).

 

 

If you have a WordPress.com account and are logged in, once you click “Start for Free” you will activate Jetpack and re-routed back to your Commons Site.

If you need to create an account, click on the option highlighted above.

Once you click “Approve,” you should see the following:

 

Then you will see the following section added to your Dashboard. Click on Settings to get started with JetPack.

 

Highlighted below are the Settings for the various plugins in the JetPack bundle. Click on each tab to explore the possibilities.

JetPack provides a nice stats plugin that you can use to track your readers.  It also provides Latex support for mathematical notation, and a bunch of other plugins, many of which are similar to other plugins on the Commons. Many members use JetPack’s “Subscription” plugin to allow people to subscribe to their sites and receive email notifications when a post is published. See more about Subscriptions.

 

In Jetpack’s “Sharing” menu, you can  add new widgets to your site  to pull in Twitter an other social media feeds.