1. Home
  2. Real User Experience (RUX)
  3. How to install the RUX-script

How to install the RUX-script

To set up Alertdesk Real User Experience, you just need to install a small piece of JavaScript on every page you wish Alertdek to monitor. When this piece of JavaScript is installed, users who navigate your site will send anonymous performance data to Alertdesk. This data can be used for:

  • Measuring how a user has experienced the different pages.
  • Priorities which pages should be optimized in regards to performance and user experience.
  • Monitor if critical pages have a poor user experience and should be prioritized.


To install Alertdesk RUX, the following piece of JavaScript must be installed in the <HEAD>-section of every page (remember to replace the “INSERT-YOUR-ALERTDESK-RUX-TOKEN-HERE” with your own Alertdesk RUX token).

<script async src="https://cdn.alertdesk.com/agent/latest/alertdesk-agent.min.js" data-alertdesk-token="INSERT-YOUR-ALERTDESK-RUX-TOKEN-HERE" type="text/javascript"></script>

Installation via Google Tag Manager

Alertdesk RUX can also be injected via Google Tag Manager. 

Go to Google Tag Manager and add a new tag. In Tag Configuration choose Custom HTML.

Insert the following piece of JavaScript and remember to replace the “INSERT-YOUR-ALERTDESK-RUX-TOKEN-HERE” with your own Alertdesk RUX-token.

<script type="text/javascript">
(function (d, t) {
    var s = d.createElement('script');
    s.setAttribute('src', 'https://cdn.alertdesk.com/agent/latest/alertdesk-agent.min.js');
    s.async = true;
    s.setAttribute('data-alertdesk-token', t);

NOTE: The script differs from the script used in the “standard installation”.

After you saved the tag configuration, go to Triggering and choose “All pages”.  

Save the tag and publish it. 

User consent

Alertdesk RUX collects anonymized data, which means it isn’t necessary to get user consent for collecting data. Alertdesk collects to following data:

– Country
– Browser version
– Browser type
– Connection type
– Device type
– URL visited
– Collection time

Updated on April 27, 2021

Related Articles