Pingdom Home

US + international: +1-212-796-6890

SE + international: +46-21-480-0920

Business hours 3 am-11:30 am EST (Mon-Fri).

Do you know if your website is up right now? We do! LEARN MORE

How to easily integrate Pingdom Real User Monitoring with Drupal

drupal real user monitoring
SUMMARY: How to easily integrate @Pingdom Real User Monitoring with Drupal using module by @Oakley_J Tweet this

By integrating Real User Monitoring (RUM) with your Drupal site, you will get a better understanding of the site’s performance and how real users experience it.

Based on data collected from real users visiting your site, you will see where visitors are connecting from, what browsers and devices they are using, how fast individual pages load, and more. With that information you can then take steps to improve your site’s performance.

We interviewed James Oakley, the developer of a new Drupal module that makes it easy to integrate our RUM service with Drupal. Especially if you are running a Drupal site, you will want to read this.

Q: What made you develop this module?

A: I wanted to try out the new RUM service, so I signed up, and was given a piece of JavaScript to insert into the HEAD section of the pages of my website. My site was built in Drupal; it’s easy to add snippets of HTML into any region of the page in Drupal (they have a system called “blocks” that allows you to do just that). However inserting into the HEAD section is a little more challenging.

I wrote a module to do just that, and it worked. However one of the things that makes Drupal great is its community, so I wanted to contribute my module back for others to use. After tidying the code up so that it is secure and coded the Drupal way, it’s now available for any Drupal site administrator to download and use with just a few clicks.

Q: Why Drupal in particular? What’s so special about Drupal?

James Oakley

James Oakley

A: I wouldn’t want to be dismissive of the other content management systems out there, because they have their places. Drupal is so versatile, that it can build almost any kind of site. When I first started working on a dynamic website and was looking for a CMS (about 6 years ago now), I chose Drupal. I didn’t know what that site would need to do down the line, but I did know that there would be a way to do it with Drupal. I’ve found that to be true – it’s easy to add customized content, and to lay the page out in the way you want. There is a great community out there as well, and people like to help each other out.

Sometimes people say that Drupal is only for people who can already write PHP. I don’t know where that myth comes from. Certainly a bit of PHP would help with debugging if you hit a problem, and you can extend Drupal by writing your own modules. But Drupal has so many well-written modules and themes; you can just download and enable them, and then configure them entirely within the web interface of your Drupal site.

Q: Why would the Real User Monitoring service be especially beneficial for Drupal sites?

A: Some people don’t use Drupal because they say it’s slow or needs a very highly specified server. Neither of those things needs to be true. Whilst Drupal is not right for every site, there are quite a few things that can be tweaked and tuned to make Drupal run much faster.

To do that, I need to know how actual users are experiencing my site. I need to see if it’s the main HTML that’s loading slowly, or the additional resources. Because certain modules can slow a site down if not configured correctly, I need to know if particular pages load more slowly than others, as then I can identify which modules may be causing the slowness.

That’s what RUM does for me. You get data on your site’s performance that synthetic testing would never give you.

Q: How about Drupal and performance? Are there any typical bottlenecks to tackle?

A: Two big bottlenecks that everyone should optimize are caching and aggregation. Since Drupal 7, both of these have been manageable without installing any additional modules.

Caching is about making sure that the web server doesn’t have to generate every page from scratch every time someone visits it. You can set Drupal to cache whole pages, or just to cache certain stages of building a page. You also have full control over how long that cached data remains valid. Setting up caching correctly would reduce server load and speed up page generation considerably. The views module now comes with caching options as well, which must be used on a production site.

Aggregation is about making sure that all the additional files a web page needs are presented efficiently. Out of the box, Drupal will list each JS or CSS file separately, meaning the web browser has to make a lot of requests for each web page. You can enable aggregation, which then combines that JS and CSS code into just a few files, which speeds up the page layout in the browser.

Q: You have used our RUM service for a short while now. In your experience, what does adding RUM to a website offer the website owner/admin?

A: You cannot beat being able to see how actual users are experiencing your site.

There are statistics and analytics services out there that will track how many visitors come to your site, from which countries, and visiting which pages. I use those. There are also synthetic website monitoring services out there, like the traditional Pingdom offering, that load a test page on a site every minute to see if it’s slowing down or unavailable. I use those too.

Analytics services can only tell you that someone has been to your site, not what kind of experience they had. Synthetic monitoring can only tell you how your test page is performing, but that may not mean that the whole site is responding as well. Pingdom RUM brings those two together. I get detailed analytic feedback on actual visits to my sites. That means I can keep the site tuned so that it is performing optimally.

There’s also a WordPress plugin

We’d like to say thank you to James for taking the time to do this interview and for his work on the Drupal module. It’s great to be able to tap into an experienced Drupal-user like James to get his views on Drupal, RUM, and web performance.

If you’re a WordPress user you’re not left out. You may want to check out our WordPress plugin for Real User Monitoring.

If you don’t yet have a RUM site set up, you simply add one by logging in to your account at my.pingdom.com and go to RUM > Add New Site. And if you don’t have a Pingdom account, get one here.



14 comments
FrontRow
FrontRow

Thanks for the reply James, I'm afraid helping with backporting to D6 would be over my head.  We're moving to D7 in a couple of months so we'll be able to use your working version then.  Thank you for your contributions to the development community-- much appreciated!

-Wendy at FrontRow

FrontRow
FrontRow

Thanks for the reply James, I'm afraid helping with backporting to D6 would be over my head.  We're moving to D7 in a couple of months so we'll be able to use your working version then.  Thank you for your contributions to the development community-- much appreciated! -Wendy at FrontRow

FrontRow
FrontRow

Do you know if there are any plans to create a Drupal 6 module?  (James Oakley's module is only for Drupal 7).   Or if not, do you know what specific steps are needed to get the RUM js code into a Drupal 6 site?

FrontRow
FrontRow

Do you know if there are any plans to create a Drupal 6 module?  (James Oakley's module is only for Drupal 7).   Or if not, do you know what specific steps are needed to get the RUM js code into a Drupal 6 site?

nnaemeka171376
nnaemeka171376

thanks for this post i just learnt how integrate  Pingdom Real User Monitoring with Drupal . thanks. http//www.unn.edu.ng

nnaemeka171376
nnaemeka171376

thanks for this post i just learnt how integrate  Pingdom Real User Monitoring with Drupal . thanks. http//www.unn.edu.ng

JamesOakley
JamesOakley

@FrontRow You're welcome. If somebody else backports it, you could test to see if it works - that's the fun thing about Drupal: there are so many levels that people can be involved.

Anyway - glad you saw this reply, and I'm looking forward to the day when my bit of work will be able to help with your site.

JamesOakley
JamesOakley

FrontRow You're welcome. If somebody else backports it, you could test to see if it works - that's the fun thing about Drupal: there are so many levels that people can be involved. Anyway - glad you saw this reply, and I'm looking forward to the day when my bit of work will be able to help with your site.

JamesOakley
JamesOakley

The Drupal approach to this would not be to create a Drupal 6 module, but to create a Drupal 6 release of the module I've created. The code needs back-porting to Drupal 6.

I would be very happy to help this to happen, but don't have the time to do this and to test it - at the moment. Drupal 6 will be EOL once Drupal 8 is released (around the end of this year), so my priority is to help ensure it's fully ready for a Drupal 8 version. I've created an "issue" on the project issue queue to give people a space to work on a back-port and review each other's work. https://drupal.org/node/2018653 If you want to join in with that, I'll gladly help and support as needed.

JamesOakley
JamesOakley

The Drupal approach to this would not be to create a Drupal 6 module, but to create a Drupal 6 release of the module I've created. The code needs back-porting to Drupal 6. I would be very happy to help this to happen, but don't have the time to do this and to test it - at the moment. Drupal 6 will be EOL once Drupal 8 is released (around the end of this year), so my priority is to help ensure it's fully ready for a Drupal 8 version. I've created an "issue" on the project issue queue to give people a space to work on a back-port and review each other's work. https://drupal.org/node/2018653 If you want to join in with that, I'll gladly help and support as needed.