How to get powerful user data with Pulse real user monitoring

Callum GavinPulseLeave a Comment

One of the key aspects of a great real user monitoring solution is, perhaps unsurprisingly, great user data. When this is available, you can see your customer’s true experiences in real time as they navigate your web site or app, alongside the list of errors they’ve had and most crucially, their contact details. If a valuable customer has a bad experience, you can reach out and let them know you’re working on it immediately. It’s also invaluable for helping with the triage of vague customer support tickets by tracing the sequence of page loads during a user session, allowing you to construct a precise picture of what happened.

If you haven’t already seen how to get started with Pulse, check this introductory blog post first.

In this blog post I’ll show how easy it is to get great user data into your Pulse dashboard, as well as some examples for popular templating DSLs. Let’s crack into it.

Basic implementation

This is what the resulting JS script should contain once you’ve provided your user data, as it would appear in the static HTML file requested from the server:

If you wish to record an anonymous user, for instance on your login page pre-authentication, you should set isAnonymous to true and optionally provide an identifier (we’ll assign a random UUID if none one isn’t set).

Naturally, you won’t want to hard-core those values, so let’s get the above snippet data-driven using some popular serverside frameworks. You want to paste these snippets into an appropriate view that is common to all the pages you want to see in Pulse. For instance, in MVC frameworks like ASP.NET MVC and Ruby on Rails, you might want to place it in a shared main layout view file, or a partial that includes only the Raygun4JS configuration.

Razor (ASP.NET MVC 3+)

Inside a .cshtml view, assuming there is a ViewModel with the following property names attached:

.ASPX in WebForms and MVC 1/2

.ERB in Rails

Assuming that the user data is available on an ‘user’ instance variable, populated from current_user and the DB:


As sometimes used in Node.JS frameworks like Express, Koa et la, and also applies of course to Mustache templates also:

Get started with Pulse now

As you can see, they’re all pretty minimal! There’s a million view engines out there so if this post has missed your favorite hopefully you can get the gist from the above examples. If you haven’t yet got your free Pulse trial, you can start here – free for 30-days and no credit card required. Any questions let us know in the comments below!

** UPDATE **

Real User Monitoring for Mobile Applications is here!  See the update here

We would absolutely recommend Raygun to any business which relies on healthy software to serve there customers. Andrew Schofield, Chief technology officer at Timely. Take a free 14 day trial. Request a short demo of Raygun.

Leave a Reply

Your email address will not be published. Required fields are marked *