Prevent creating tag tokens before the RUM script is loaded

Prev Next

Page Groups, Variations, Insight Indicators, and Tracepoints in Real User rely on a unique identifier known as a tag token added to a page to track custom data. To use a tag token, enter an arbitrary unique identifier for the feature set in the tag token field under the Variation field, and manually include that token with the tag in the page source that corresponds with that Page Group or Variation. For Variations and Insights, the tag should come just after the tracking tag in the head. For Page Groups, the tag should be included with the code for that module. For example, a Page Group tag for product pages might be included in a file called products.php.

Tag tokens must be lower-case and can be up to 30 characters. Tokens do not allow special characters such as hyphens.

Tag tokens are contained within single quotes, e.g. 'tag token'

To prevent creating tag tokens before the Catchpoint script is loaded, use the GlimpseLoaded event as follows:

  • The addEventListener() method attaches an event handler to the specified element.
  • The first parameter, GlimpseLoaded, is the type of event.
  • The second parameter is the function we want to call when the event occurs. In this case, it calls function init() once the library has been loaded.

Syntax:

Page Group: RProfiler.addInfo('pageGroup', 'tag token');
Variation: RProfiler.addInfo('variation', 'tag token');
Insight Indicator: RProfiler.addInfo('indicator', 'tag token', indicator value);
Insight Tracepoint: RProfiler.addInfo('tracepoint', 'tag token', 'tracepoint value');
Conversion: RProfiler.addInfo('conversion', revenue, items sold);

Examples:

Page Group: RProfiler.addInfo('pageGroup', 'pg1');
Variation: RProfiler.addInfo('variation', 'tsta');
Insight Indicator: RProfiler.addInfo('indicator', 'srvrtime', 150);
Insight Tracepoint: RProfiler.addInfo('tracepoint', 'srvrname', ‘My Server 1’);
Conversion Only : RProfiler.addInfo('conversion',0,0);
Conversion + Revenue Revenue must include at least one item. RProfiler.addInfo('conversion',100,1);
Conversion + Sale + Items RProfiler.addInfo('conversion',150,10);