The Core extension is the default extension released with Launch.
Use this reference for information about the options available when using this extension to build a rule.
This topic describes the event types available in the Core extension.
Event types are divided into the following categories:
For information about options that can be set for several different event types, see Options.
Trigger the action when a tab loses the focus.
There are no settings for this event type.
Trigger the action when a tab gains the focus.
There are no settings for this event type.
Trigger the action when a form loses the focus.
See Options, below.
Trigger the action when a form gains the focus.
See Options, below.
Trigger the action when a form is submitted.
See Options, below.
Trigger the event if a key is pressed.
See Options, below.
Trigger the event when the media ends.
See Options, below.
Trigger the event when the media loads data.
See Options, below.
Trigger the event when the media is paused.
See Options, below.
Trigger the even when the media is played.
See Options, below.
Trigger the event if the media stalls.
See Options, below.
Trigger the event if the media is played for a specified length of time.
See Options, below.
In addition, specify that the event is triggered after a specific amount of time.
Trigger the event if the volume is raised or lowered.
See Options, below.
Trigger the event if the device's orientation changes.
There are no settings for this event type.
In addition, specify that the event is triggered after a specific amount of time.
Trigger the event if the user zooms in or out.
There are no settings for this event type.
Trigger the event if the specified element is clicked.
See Options, below.
You can also specify whether to delay navigation until the rule runs if the element is a link.
In addition, specify that the event is triggered after a specific amount of time.
Trigger the event if the user hovers over a specified element.
See Options, below.
In addition, configure whether the rule is triggered immediately or after a specified number of milliseconds.
Trigger the event if a custom event type occurs.
You can name a JavaScript function that you've defined elsewhere and use it for the event.
Specify the name of the custom event type, then configure the other settings as described in Options, below.
Trigger the event if a specified data element changes.
Enter the data element name. You can select the data element from a list by clicking the icon and then selecting the data element.
Designed to bypass event detection and lookup systems.
Direct call rules are ideal for situations where you want to tell Launch exactly what is happening. Also, they are ideal when Launch cannot detect an event in the DOM, such as with Adobe Flash.
Specify the _satellite.track string.
Trigger the event if a specified element exists.
See Options, below.
Trigger the event if the user enters a specified viewport.
See Options, below.
In addition, configure whether the rule is triggered immediately or after a specified number of milliseconds.
Trigger the event if a pushState or hashchange occurs.
There are no settings for this event type.
Trigger the event if the user remains on the page for a specified number of seconds.
Specify the number of seconds that must pass before the event is triggered.
Trigger when the DOM is ready.
There are no settings for this event type.
Trigger the event when the page loads.
There are no settings for this event type.
Trigger the event if the user reaches the bottom of the page
There are no settings for this option.
Each of the form event types uses the following settings:
- If you choose Specific Elements, the options to select the elements and property values appear.
- If you choose Any Element, there are no further options required to narrow down the elements.
Enter the CSS selector that identifies the elements that trigger the event.
If you select this option, the following parameters become available:
property=valueSpecify the value for the property- Regex
Enable if the
property=valueis a regular expression. - Add
Add another
property=valuepair.
- Run this rule even when the event originates from a descendant element
- Allow this rule to run even if the event already triggered a rule targeting a descendant element
- After the rule runs, prevent the event from triggering rules targeting ancestor elements
This section describes the condition types available in the Core extension.
Event condition types are divided into the following categories:
Specify the cookie name and value that must exist for an event to trigger an action.
- Specify a cookie name.
- Enter the value that must exist in the cookie if the event is to trigger an action.
- (Optional) Enable Regex if this is a regular expression.
Specify whether the user has opted out of cookies.
Set whether the user accepts cookies.
Specify any custom code that must exist as a condition of the event. Use the built-in code editor to enter the custom code.
- Click Open Editor.
- Type the custom code.
- Click Save.
Compares two values. See Value Comparison operators, below, for more details.
- Provide a value.
- Select the operator.
- (Where required) Select whether the comparison should be case-insensitive.
- Provide another value for the comparison.
Specify the JavaScript variable name and value that must exist for an event to trigger an action.
- Specify the JavaScript variable name.
- Specify the variable value that must exist as a condition for the event.
- (Optional) Enable Regex if this is a regular expression.
The Data category also includes the following Value Comparison operators:
The condition returns true if the two values are equal using a non-strict comparison (in JavaScript, the == operator). The values may be of any type. When typing a word like true, false, null, or undefined into a value field, the word is compared as a string and is not be converted to its JavaScript equivalent.
The condition returns true if the two values are not equal using a non-strict comparison (in JavaScript, the != operator). The values may be of any type. When typing a word like true, false, null, or undefined into a value field, the word is compared as a string and is not be converted to its JavaScript equivalent.
The condition returns true if the first value contains the second value. Numbers are converted to strings. Any value other than a number or string results in the condition returning false.
The condition returns true if the first value does not contain the second value. Numbers are converted to strings. Any value other than a number or string will result in the condition returning true.
The condition returns true if the first value starts with the second value. Numbers are converted to strings. Any value other than a number or string results in the condition returning false.
The condition returns true if the first value does not start with the second value. Numbers are converted to strings. Any value other than a number or string results in the condition returning true.
The condition returns true if the first value ends with the second value. Numbers are converted to strings. Any value other than a number or string results in the condition returning false.
The condition returns true if the first value does not end with the second value. Numbers are converted to strings. Any value other than a number or string results in the condition returning true.
The condition returns true if the first value matches the regular expression. Numbers are converted to strings. Any value other than a number or string results in the condition returning false.
The condition returns true if the first value does not match the regular expression. Numbers are converted to strings. Any value other than a number or string results in the condition returning true.
The condition returns true if the first value is less than the second value. Strings representing numbers are converted to numbers. Any value other than a number or a convertible string result in the condition returning false.
The condition returns true if the first value is less than or equal to the second value. Strings representing numbers are converted to numbers. Any value other than a number or a convertible string result in the condition returning false.
The condition returns true if the first value is greater than the second value. Strings representing numbers are converted to numbers. Any value other than a number or a convertible string result in the condition returning false.
The condition returns true if the first value is greater than or equal to the second value. Strings representing numbers are converted to numbers. Any value other than a number or a convertible string result in the condition returning false.
The condition returns true if the value is a boolean with the value of true. The value you provide is not converted to a boolean if it is any other type. Any value other than a boolean with the value of true results in the condition returning false.
The condition returns true if the value is true after being converted to a boolean. See MDN's Truthy documentation for examples of truthy values.
The condition returns true if the value is a boolean with the value of false. The value you provide is not converted to a boolean if it is any other type. Any value other than a boolean with the value of false results in the condition returning false.
The condition returns true if the value is false after being converted to a boolean. See MDN's Falsy documentation for examples of falsy values.
Specify the page the user must land on to trigger the event.
- Specify the landing page.
- (Optional) Enable Regex if this is a regular expression.
Specify whether the visitor should be a new visitor or a returning visitor for an event to trigger an action.
Select one of the following:
- New Visitor
- Returning Visitor
Configure the number of times the visitor must view the page before the action is triggered.
- Select whether the number of page views must be greater than, equal to, or less than the specified value.
- Specify the number of page views that determines whether the condition is met.
- Configure when the page views are counted by selecting one of the following:
- Lifetime
- Current Session
Trigger the action if the user's number of sessions meets the specified criteria.
- Select whether the number of sessions must be greater than, equal to, or less than the specified value.
- Specify the number of sessions that determines whether the condition is met.
Trigger the action if the user's number of sessions meets the specified criteria.
Configure how long the visitor must be on the site before the action is triggered.
- Select whether the number of minutes the visitor is on the site must be greater than, equal to, or less than the specified value.
- Specify the number of minutes that determines whether the condition is met.
Trigger the action if the user's number of sessions meets the specified criteria.
Specify the source of the visitor's traffic that must be true for the action to be triggered.
- Specify the traffic source.
- (Optional) Enable Regex if this is a regular expression.
Select the browser the visitor must use for the action to be triggered.
Select one or more of the following browsers:
- Chrome
- Firefox
- Internet Explorer/Edge
- Internet Explorer Mobile
- Mobile Safari
- OmniWeb
- Opera
- Opera Mini
- Opera Mobile
- Safari
Select the device type the visitor must use for the action to be triggered.
Select one or more of the following device types:
- Android
- Blackberry
- Desktop
- iPad
- iPhone
- iPod
- Nokia
- Windows Phone
Select the operating system the visitor must use for the action to be triggered.
Select one or more of the following operating systems:
- Android
- Blackberry
- iOS
- Linux
- MacOS
- Maemo
- Symbian OS
- Unix
- Windows
Select the screen resolution visitors must use on their devices for the action to be triggered.
- Select whether the screen resolution width of the visitor's device must be greater than, equal to, or less than the specified value.
- Specify the number of pixels required for the screen resolution width.
- Select whether the screen resolution height of the visitor's device must be greater than, equal to, or less than the specified value.
- Specify the number of pixels required for the screen resolution height.
Select the window size visitors must use on their devices for the action to be triggered.
- Select whether the window size width of the visitor's device must be greater than, equal to, or less than the specified value.
- Specify the number of pixels required for the window size width.
- Select whether the window size height of the visitor's device must be greater than, equal to, or less than the specified value.
- Specify the number of pixels required for the window size height.
Specify the visitor's domain.
Specify one or more hash patterns that must exist in the URL.
Note: Multiple hash patterns are joined by an OR.
- Specify the hash pattern.
- (Optional) Enable Regex if this is a regular expression.
- Add any other hash patterns.
Specify one or more paths that must exist in the URL.
Note: Multiple paths are joined by an OR.
- Specify the path.
- (Optional) Enable Regex if this is a regular expression.
- Add any other paths.
Specify the protocol used in the URL.
Select one of the following:
- HTTP
- HTTPS
Specify one or more subdomains that must exist in the URL.
Note: Multiple subdomains are joined by an OR.
- Specify the subdomain.
- (Optional) Enable Regex if this is a regular expression.
- Add any other subdomains.
Specify URL parameter used in the URL.
- Specify a URL parameter name.
- Specify the value used for the URL parameter.
- (Optional) Enable Regex if this is a regular expression.
This section describes the exception types available in the Core extension.
Event condition types are divided into the following categories:
Specify the cookie name and value that can't exist for an event to trigger an action.
- Specify a cookie name.
- Enter the value that must not exist in the cookie if the event is to trigger an action.
- (Optional) Enable Regex if this is a regular expression.
Specify whether the user has opted out of cookies.
Set whether the user accepts cookies.
Specify any custom code that must exist as a condition of the event. Use the built-in code editor to enter the custom code.
- Click Open Editor.
- Type the custom code.
- Click Save.
Specify the JavaScript variable name and value that must not exist for an event to trigger an action.
- Specify the JavaScript variable name.
- Specify the variable value that must not exist as a condition for the event.
- (Optional) Enable Regex if this is a regular expression.
Specify the page the user must not land on to trigger the event.
- Specify the landing page.
- (Optional) Enable Regex if this is a regular expression.
Specify whether the visitor should not be a new visitor or a returning visitor for an event to trigger an action.
Select one of the following:
- New Visitor
- Returning Visitor
Configure the number of times the visitor must view the page to keep the action from being triggered.
- Select whether the number of page views must be greater than, equal to, or less than the specified value.
- Specify the number of page views that determines whether the exception is met.
- Configure when the page views are counted by selecting one of the following:
- Lifetime
- Current Session
Do not trigger the action if the user's number of sessions meets the specified criteria.
- Select whether the number of sessions must be greater than, equal to, or less than the specified value.
- Specify the number of sessions that determines whether the condition is met.
Configure how long the visitor must be on the site to prevent the action from being triggered.
- Select whether the number of minutes the visitor is on the site must be greater than, equal to, or less than the specified value.
- Specify the number of minutes that determines whether the condition is met.
Specify the source of the visitor's traffic that must be true to prevent the action from being triggered.
- Specify the traffic source.
- (Optional) Enable Regex if this is a regular expression.
Select the browser the visitor must not use for the action to be triggered.
Select one or more of the following browsers:
- Chrome
- Firefox
- Internet Explorer/Edge
- Internet Explorer Mobile
- Mobile Safari
- OmniWeb
- Opera
- Opera Mini
- Opera Mobile
- Safari
Select the device type the visitor must not use for the action to be triggered.
Select one or more of the following device types:
- Android
- Blackberry
- Desktop
- iPad
- iPhone
- iPod
- Nokia
- Windows Phone
Select the operating system the visitor must not use for the action to be triggered.
Select one or more of the following operating systems:
- Android
- Blackberry
- iOS
- Linux
- MacOS
- Maemo
- Symbian OS
- Unix
- Windows
Select the screen resolution visitors must not use on their devices for the action to be triggered.
- Select whether the screen resolution width of the visitor's device must be greater than, equal to, or less than the specified value.
- Specify the number of pixels required for the screen resolution width.
- Select whether the screen resolution height of the visitor's device must be greater than, equal to, or less than the specified value.
- Specify the number of pixels required for the screen resolution height.
Select the window size visitors must not use on their devices for the action to be triggered.
- Select whether the window size width of the visitor's device must be greater than, equal to, or less than the specified value.
- Specify the number of pixels required for the window size width.
- Select whether the window size height of the visitor's device must be greater than, equal to, or less than the specified value.
- Specify the number of pixels required for the window size height.
Specify the visitor's domain that will prevent the action from being triggered.
Specify one or more hash patterns that must not exist in the URL.
Note: Multiple hash patterns are joined by an OR.
- Specify the hash pattern.
- (Optional) Enable Regex if this is a regular expression.
- Add any other hash patterns.
Specify one or more paths that must not exist in the URL.
Note: Multiple paths are joined by an OR.
- Specify the path.
- (Optional) Enable Regex if this is a regular expression.
- Add any other paths.
Specify the protocol that cannot be used in the URL.
Select one of the following:
- HTTP
- HTTPS
Specify one or more subdomains that must not exist in the URL.
Note: Multiple subdomains are joined by an OR.
- Specify the subdomain.
- (Optional) Enable Regex if this is a regular expression.
- Add any other subdomains.
Specify URL parameter that cannot be used in the URL.
- Specify a URL parameter name.
- Specify the value used for the URL parameter.
- (Optional) Enable Regex if this is a regular expression.
This section describes the action types available in the Core extension.
Provide the code that runs after the event is triggered and conditions are evaluated.
- Name the action code.
- Select the language used to define the action:
- JavaScript
- HTML
- Select whether to execute the action code globally.
- Click Open Editor.
- Edit the code, then click Save.
The Core extension, available to all Launch users, contains a Custom Code action for executing user-provided JavaScript or HTML. It is often helpful for users to understand how rules with Custom Code actions are processed.
Code from custom actions is embedded in the main Launch library. The code is written to the document using document.write. If a rule has multiple Custom Code actions, the code is written in the order configured in the rule.
Code from custom actions is loaded from the server and written to the document using Postscribe. If a rule has multiple Custom Code actions, the code is loaded in parallel from the server, but written in the order configured in the rule.
While using document.write after a page has loaded would typically present problems, this is not an issue for code provided through Custom Code actions. You may use document.write within Custom Code actions regardless of when the code will be executed.
The validator used in the Launch code editor is designed to identify issues with developer-written code. Code that has gone through a minification process--such as the AppMeasurement.js code downloaded from the Code Manager--might be falsely flagged as having issues by the Launch validator, which can usually be ignored.