Integrating Drupal with an Analytics Platform: How Did It.

One of the great things about Drupal is its flexible system of nodes and taxonomies. This allows for bespoke categorization of many types of content.

At, we wanted to take advantage of that., which has an alliance with Acquia to bring joint tech solutions to the worlds biggest media companies, works with hundreds of digital publishers to provide audience insights through an intuitive analytics platform.

By using’s dashboards and APIs, publishers at any stage of the digital process can build online strategies that allow them to grow and engage a loyal audience.

Beyond precise measurement of views, visitors, shares, and time, includes breakouts of on-page attention, mobile devices, and visitor retention. Publishers can use this data to identify high-quality long-form content, engaging images and videos, new traffic sources for distribution, and audience interest segments that lead to loyalty.

Yet Drupal’s flexibility, while allowing for highly complex websites, has made it a challenge to take full advantage of’s capabilities, primarily because only experienced Web developers with HTML, CSS, and JavaScript chops could integrate the tools. Thus, integrating with a Drupal site heretofore meant each individual site had to make use of a dedicated Drupal developer to roll a custom solution.

The proposed solution: To alleviate this burden, we decided that a dedicated Drupal module which handled this integration for all sites wanting to use made a lot more sense. This would help publishers integrate with the platform to create fully custom sites benefitting from the full power of’s data-mining tools, without requiring them to have someone with in-depth programming skills to map the nodes and taxonomies onto’s back-end.

How it would work: The Drupal plugin would automatically insert the required page tag and JavaScript on all of the published pages and posts -- making it easier than ever to figure out what content is driving visitors to a site, and why.

Benefits of integrating + Drupal

The new for Drupal module is a great example of how well a proprietary platform can integrate with Drupal. For this, was fortunate to work with Forest Mars, founder at The Mars Group, to complete the first version of the Publishing Analytics project.

Mars said of the project: “ is a good match for Drupal because Drupal is a dynamic publishing platform with the ability to create and manage complex content relationships; this gives a high level of control over what content is reported and numerous integration points for control over how these analytics get reported.”

Some interesting aspects of the integration

The integration takes advantage of Drupal’s powerful framework and community of contributors.

Drupal is an ecosystem comprised of thousands of modules, built by thousands of developers. These modules offer site owners the unique ability to add new features and additional behaviors to existing code without having to modify the code itself.

To put it simply, developers can use combinations of modules, aka “recipies,” as building blocks to create additional functionality in Drupal. The initial module for enables sites to track certain content and reader actions, and, thanks to Drupal’s underlying architecture (or “Aspect Oriented Programming” in technical speak) other developers have the ability to take these integrations even deeper.

Anticipating interest from other developers in integrating the module with their own projects, the initial release includes a stub for future token integration in the build. Token, which is the 3rd most widely used of all contributed Drupal modules, provides small placeholders that  can be used in the Web interface to represent a data connection that would otherwise require writing a lengthy bit of code.

The module roadmap also includes possible integration with Metatag module which can provide the logic of when and where to output tags using tokens. The Metatag module also enables configuration inheritance.

Ultimately, the module will allow any data on a publishing website anywhere to be integrated in a way that is more customizable than traditional tools like Google Analytics.

Development made possible on Github

Rather than limit development to, the module is on Github, which is is automatically (some would say magically) synched to using the Hubdrop platform. In this way, any developer can fork the code from the repository on Github, and contribute changes with a pull request. Hubdrop then automagically pushes those changes to the module on This means that developers who are not familiar with the idiosyncracies of can easily contribute to using a more standard git process on the widely used Github platform.  

The integration is highly configurable.

The Drupal plugin is highly configurable and takes advantage of Drupal’s rich architecture. For tech newbies who who need to quickly and easily install the plugin and start tracking data on their website, it is essentially plug-and-play. However, for advanced power users, the plugin serves as a forward-looking toolset for any publishing website -- with lots of options for customization. As a matter of fact, in this first release, the configuration page has at least a dozen options -- all organized in drop-down menus so they are not so intimidating.

Using the Drupal module’s easy integration with Drupal modules is a testament to’s simplicity, and Drupal’s plug-and-play ecology. The module serves as a roadmap for deep integration with any data on any website. Data on your website that you need to view from a business perspective, you can view from the dashboard.

The plugin integrates analytics and metadata on your site in just a few clicks. Here’s how to integrate Drupal and

  1. Download and install the Drupal module from

  2. Enable the module in the “Modules” page of Drupal under the “Statistics” subheading, and hit save.

  3. Go to the settings page at: Configuration > Search And Metadata >

  4. Enter the Site ID (You can find your Site ID on your your settings page) and configure the plugin according to how your Drupal site uses nodes and/or taxonomies (the plugin requires you to choose one or the other to work).

  5. Click “Save” and your integration is ready to go!

A small piece of JavaScript code monitors user actions taken on your site and relays them to the analytics server. These insights allow you to see your data in the way that makes the most sense to you, with both real-time analytics to help you inform ever-fluid social strategies as well as historical data that can give you a unique perspective on your content and how your audience interacts with it.

Once is up and running, organizational elements within Drupal may be used as section tags for use in tracking via, thus avoiding the need for assigning individual tags to trackable elements.

Again, one of Drupal’s biggest benefits is its extremely flexible node and taxonomy system, and we’ve accounted for that flexibility within the plugin itself. Whether you use content types, or taxonomies and tags for managing your site's published sections, we’ll help you get your data into as quickly and painlessly as possible.

Because of the power and flexibility of both Drupal and, wiring the two together took some time. But now, by simply installing the plugin, you can experience the power and versatility of Drupal with insights from -- and see just how your audience interacts with your content, both over time and in the last ten minutes!