Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Working with Node.js
      • Node.js Behavior in Heroku
      • Troubleshooting Node.js Apps
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • PHP Behavior in Heroku
      • Working with PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Model Context Protocol
    • Vector Database
    • Heroku Inference
      • Inference Essentials
      • AI Models
      • Inference API
      • Quick Start Guides
    • Working with AI
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Add-ons
  • All Add-ons
  • Raygun Real User Monitoring
Raygun Real User Monitoring

This add-on is operated by Raygun

User-centric front-end performance monitoring.

Raygun Real User Monitoring

Last updated September 03, 2020

Table of Contents

  • Provisioning the add-on
  • Configuring your application
  • Using Real User Monitoring
  • Migrating between plans
  • Removing the add-on
  • Support

Raygun Real User Monitoring (RUM) provides insights into the front-end performance of your application, enabling you to understand how performance is impacting the user experience.

Real User Monitoring enables you to:

  • Identify and resolve performance issues
  • Get instance-level insights into every user session
  • Measure the impact of performance optimizations
  • See how users are interacting with your application

Provisioning the add-on

Raygun Real User Monitoring can be attached to a Heroku application via the CLI:

A list of all plans available can be found here.

$ heroku addons:create raygun-rum:rum-free --app your-app-name
Created raygun-rum-kiwi-9001

After you provision Raygun Real User Monitoring, the RAYGUN_RUM_APIKEY config var is available in your app’s configuration. It contains the API key used to send data to Raygun. You can confirm this via the heroku config:get command:

$ heroku config:get RAYGUN_RUM_APIKEY --app your-app-name
your_api_key_here

Configuring your application

After you install Raygun Real User Monitoring, your application will need to be configured to fully integrate with the add-on.

STEP 1 - Install the client library

Using our CDN:

Add this snippet to your markup, before the closing <head/> tag:

<script type="text/javascript">
  !function(a,b,c,d,e,f,g,h){a.RaygunObject=e,a[e]=a[e]||function(){
  (a[e].o=a[e].o||[]).push(arguments)},f=b.createElement(c),g=b.getElementsByTagName(c)[0],
  f.async=1,f.src=d,g.parentNode.insertBefore(f,g),h=a.onerror,a.onerror=function(b,c,d,f,g){
  h&&h(b,c,d,f,g),g||(g=new Error(b)),a[e].q=a[e].q||[],a[e].q.push({
  e:g})}}(window,document,"script","//cdn.raygun.io/raygun4js/raygun.min.js","rg4js");
</script>

Or manually:

Download the production script (minified), the development script (full source) or see here for installing with npm

STEP 2 - Enable Real User Monitoring

Add the following lines of JS code just before the closing body tag in your site or app:

<script type="text/javascript">
  rg4js('apiKey', 'RAYGUN_RUM_APIKEY'); // Enter your RAYGUN_RUM_APIKEY here.
  rg4js('enablePulse', true);
</script>

STEP 3 - Browse your application

We recommend browsing to your application right now to test that everything is wired up correctly. Raygun will begin collecting and reporting data within a few minutes.

Additional options:

Single Page Applications: You can track SPA view changes with thetrackEvent function:

rg4js('trackEvent', { type: 'pageView', path: 'url/goes/here' });

For more examples on how to use the trackEvent function, see the Single Page Application documentation.

The language guides in the Raygun documentation provide detailed information about installation, configuration, and additional features.

Using Real User Monitoring

For more information on getting the most out of using Raygun, see our Real User Monitoring documentation

You can access the application via the CLI:

$ heroku addons:open raygun-rum-kiwi-9001 --app your-app-name
Opening raygun-rum-kiwi-9001

Alternatively, visit the Heroku Dashboard and select your application. Once here, you can navigate to Raygun Real User Monitoring from the Add-ons menu.

Migrating between plans

Use the heroku addons:upgrade command to migrate to a new plan.

$ heroku addons:upgrade raygun-rum:business --app your-app-name
--> Changing raygun-rum-kiwi-9001 on your-app-name from raygun-rum:rum-free to raygun-rum:rum-business
       Your plan changes have been successfully applied

Removing the add-on

You can remove Raygun Real User Monitoring via the CLI:

This will destroy all associated data and cannot be undone!

$ heroku addons:destroy raygun-rum-laser-kiwi-9001 --app your-app-name
Destroying raygun-rum-kiwi-9001 on your-app-name... done

Support

All Raygun Real User Monitoring support and runtime issues should be submitted via one of the Heroku Support channels. Any non-support related issues or product feedback is welcome at the Raygun forums.

Keep reading

  • All Add-ons

Feedback

Log in to submit feedback.

Zara 4 Real Email

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices