Introduction
Scenarios allow you to reproduce the navigation of any user journey including conversion funnels, form completion, complex journeys with post-login area (and more) to measure their performance.
A scenario is formed by a sequence of steps. A step is composed of different actions, which can be user interactions with the page or functional control points.
Before you get started
When creating a user scenario monitor, it can be executed hundreds of times a day (depending on chosen frequency) so we advise you to anticipate the impact on your systems (analytics, CRM, stocks, etc).
Creating a scenario
There are two methods for you to create a scenario:
1. [Recommended] Record a scenario from your own browser and import it easily
2. Manually creating a scenario by following the steps below.
Manually creating a scenario, steps and actions
Follow the steps below to create a scenario manually, or if you have imported a recording from your browser and want to create additional steps or actions.
Create a scenario
1. Go to the Scenarios in the main menu and click 'Create a user journey'.
2. Enter the name for the Scenario, set up the device and location and configure the advanced settings (if required) and click 'Save'.
3. Scroll down to the ‘Scenario disruption and alerts’ and use the toggles to enable or disable the options available:
- Stop the scenario as soon as a step encounters an error when a step encounters an error
- Receive an email alert when a checkpoint fails and/or when a scenario execution has an error
Create a step
What is a step
During the creation or modification of a User scenario, you will have to manage a series of steps. A step is composed of a name, a description, a series of actions (interactions or control), potential corresponding alerts and a position within the scenario (steps are executed sequentially).
Create the first step and click 'Create and configure step' (Name the step clearly as you will see these details in the user execution report).
Each step contains one recorded action which triggers the performance test of the step (network traffic listening and video capture).
Create actions for steps
Create the recorded action
1. The first action created in the first step is the recorded action. Its execution triggers the capture of the video and the listening of the network traffic. It will only end when a significant interruption in network traffic is detected.
2. Name the recorded action and select the URL on which your scenario needs to start. The recorded action for your first Step is required to be a Direct access to the page which will be the starting point of the scenario.
For subsequent steps, the recorded action should not be a Direct Access, but emulate a user interaction you want to record.
Note, the first action of a step is sometimes not the one you want to record, so even if the system enforces it, please note you can change the recorded action later.
3. Click ‘Validate’ to save the action.
Add more actions
Click ‘Add new action’ and enter the action name and select an action type.
Interactions: Interactions allow you to reproduce the actions of a user
Checks: Checks allow you to check that the page is in the expected state and to issue, at runtime, warnings if not.
Optional interactions*: Optional interactions help you to monitor a user journey on a page that includes volatile behavior (such as a pop in that can be displayed but is not always displayed).
*You cannot use optional interactions when creating or editing a recorded action. Before each action we wait for the presence of the element in the DOM (max. 3 seconds).
You can continue creating more steps with more actions by clicking on the Add a new step button.
Set up actions based on elements
The recorded action of the first step of a scenario is of the type: "Direct access to a URL" to define the starting point of the scenario.
The other types of actions are all based on the element available on the web page being consulted (e.g. a button you want to click).
To identify an element, different selection methods are available:
XPATH: selection of elements from an xpath selector.
Example: //a[text()="A text"]
.
CSS: selection of elements from a CSS selector.
Example: .container .item
.
TAG: selection of elements from a tag name.
Example: h1
.
ID: selection of elements from a unique identifier.
Example: main-content
.
NAME: selection of elements from its name
attribute.
Example: : firstname
.
CLASS: selection of elements from one of their classes.
Example: main-nav
.
1. Be sure to use a precise selector, isolating a single element. If your selector matches several items on the page, Speed Analysis Lab will use the first item it finds. However, this "first" status could evolve with the updates of your site or our Chrome updates. We, therefore, recommend that you avoid relying on this approach as much as possible.
2. When the type of action demands it, you may have to fill in a Value
field containing the value to be entered or checked. If you need to insert a random string, you can use code snippet ${RANDOM_STRING}
.
3. Scenario supports interaction with iframe, even cross-domain iframes.
To target an element in an iframe, write the selector considering the iframe document is a standalone HTML document. Make sure your selector is unique in the iframe and does not match any element in the parent document.
Execute the scenario
Use the Actions drop down menu and select 'Execute now' to manually execute the scenario.
Activate an automated monitoring of your Scenario from the same "Actions" menu, via the "Configure Monitoring" action. Configure the scheduling and frequency of your Scenario monitoring.
You can disable a running monitor at any time via the "Actions" menu, then "Disable monitoring". It can be enabled back in one click in the future.
Learn how to analyze the user scenario data
FAQs
1. How do I delete a step?
Click 'Manage' in the step section.
Scroll down and click 'Delete this step'
Deleting a step is final and involves deleting the execution history in the monitoring results page.
2. Can I use the scenario feature to track pages on Single Page Application?
Yes, You can use the Scenario feature to track specific pages on Single Page Application (SPA funnels) in a post log-in area.