Analyzing site visitor statistics

While you can get a sense of how your site visitors are interacting with your website by monitoring which pages they view and how often, it's a very limited view. Drupal Commons supports sending user event data to Acquia Analytics, where you can track and analyze specific user behaviors on your website, including signing in or out, posting content or comments, or even following a user or group.

Connecting your site to Acquia Analytics

To integrate your Drupal Commons website with Acquia Analytics:

  1. Acquia Analytics uses KISSmetrics to collect and aggregate data. If you don't already have a KISSmetrics account, sign up for a free account at https://www.kissmetrics.com.
  2. Download the KISSmetrics PHP library from GitHub (ZIP file download link), and then extract the library to profiles/commons/libraries in your docroot.
  3. Rename the new library folder to kissmetrics. The KM.php file should now be located at profiles/commons/libraries/kissmetrics/KM.php.
  4. Sign in to your website as an administrator account.
  5. Go to Menu > Modules, select the Commons KISSmetrics check box, and then click Save configuration.

    The module depends on several other modules in the distribution. Click Continue to enable these additional, required modules.

  6. Go to Menu > Configuration > KISSmetrics.
  7. In the API Key field, enter your account's KISSmetrics API key.
  8. Click Save configuration.

Your website will now track and report on your users' actions, which you can view on your KISSmetrics account page.

Sending events to Acquia Analytics

By default, Drupal Commons sends information about tracked events to Acquia Analytics each time cron runs on your website. While this may be acceptable during website development or for low-volume websites, normal website usage between cron runs may cause a large amount of events to be sent to Acquia Analytics' servers, which can affect your website's performance.

For average or larger websites, we suggest that you schedule a Drush command to regularly send the tracked event data to Acquia Analytics. To do this:

  1. Go to Menu > Configuration > KISSmetrics.
  2. Clear the Process requests on cron check box, and then click Save configuration.
  3. Schedule a Drush command similar to the following to send the tracked data that has accumulated since the last sending:

    drush kissmetrics-send-logged-queries

Tracked events list

Acquia Analytics tracks and logs the following user events on your Drupal Commons:

  • Adds a user as a trusted contact
  • Confirms a user as a trusted contact
  • Creates content (post, question, answer, wiki, document, poll, group, event)
  • Edits a wiki
  • Edits user profile
  • Follows a group
  • Follows a piece of content
  • Follows a topic
  • Follows a user
  • Likes content
  • Posts a comment
  • Registers for the website
  • Replies to a private message
  • Reports content as inappropriate
  • Sends an initial private message
  • Signs in
  • Signs out

Tracking additional events

Although Acquia Analytics can track many of the user events on your website, you can also configure your website to track additional events, which are then sent to Acquia Analytics for logging and review.

To track an additional event:

  1. Go to Menu > Configuration > Rules.
  2. Click Add new rule to create a rule.
  3. After you configure the rule, including the event it reacts to, in the Actions section, click Add action to view a list of the available actions.
  4. Click Record a KISSmetrics event.
  5. Continue and save the rule.
Drupal Projects

Contact supportStill need assistance? Contact Acquia Support