Turbine Free Variable

The turbine object is a “free variable” within the scope of your extension’s library modules. It provides information and utilities specific to the Launch runtime and is always available to library modules without using require().

turbine.buildInfo: Object<string, string>


An object containing information about the build of the current Launch runtime library. The object will contain the following values:

  • buildInfo.turbineVersion: string

    The Turbine version used inside the current library.

  • buildInfo.turbineBuildDate: string

    The ISO 8601 date when the version of Turbine used inside the container was built.

  • buildInfo.buildDate: string

    The ISO 8601 date when the current library was built.

  • buildInfo.environment: string

    The environment for which this library was built. The possible values are: ‘development’, ‘staging’, ‘production.’

This is an example demonstrating the object values.

    turbineVersion: "14.0.0",
    turbineBuildDate: "2016-07-01T18:10:34Z",
    buildDate: "2016-03-30T16:27:10Z",
    environment: "development"

turbine.getDataElementValue(name: string) => *


Returns the value of a data element.

turbine.getExtensionSettings() => *

var extensionSettings = turbine.getExtensionSettings();

Returns the settings object that was last saved from the extension configuration view.

Please note that values within the returned settings objects may be coming from data elements. Because of this, calling getExtensionSettings() at different times may yield different results if the values of the data elements have changed. To get the most up-to-date values, please wait until as late as possible before calling getExtensionSettings().

turbine.getHostedLibFileUrl(file: string) => string

var loadScript = require('@adobe/reactor-load-script');
loadScript(turbine.getHostedLibFileUrl('AppMeasurement.js')).then(function() {
  // Do something ...

The hostedLibFiles property can be defined inside the extension manifest in order to host various files along with the Launch runtime library. This module returns the URL where the given library file is hosted.

turbine.getSharedModule(extensionName: string, sharedModuleName: string) => *

var mcidInstance = turbine.getSharedModule('adobe-mcid', 'mcid-instance');

Retrieves a module which has been shared from another extension. If no matching module is found, undefined will be returned. See Implementing Shared Modules for more information regarding shared modules.

turbine.logger: Object<string, Function>


Logging utility used to log messages to the console. Messages will only show in the console if debugging is turned on by the user. The recommended way to turn on debugging is to use the Adobe DTM Switch Chrome extension. As an alternative, the user can run the following command _satellite.setDebug(true) inside the browser development console. The logger has the following methods:

  • logger.log(message:string)

    Logs a message to the console.

  • logger.info(message: string)

    Logs an informational message to the console.

  • logger.warn(message: string)

    Logs a warning message to the console.

  • logger.error(message: string)

    Logs an error message to the console.

turbine.onPageBottom(callback: Function)

We recommend not using this utility if possible. As more consumers move toward loading Launch asynchronously, the concept of “page bottom” becomes less relevant.

turbine.onPageBottom(function() {
  // This will be executed at page bottom.

The callback argument will be executed when the _satellite.pageBottom() method is called. satellite.pageBottom() is typically called by the host site just before the end of the body tag; however, a host site may choose to load the Launch library asynchronously, in which case they will not call _satellite.pageBottom() (_satellite won’t exist until after page bottom). If the window load event is fired by the browser and _satellite.pageBottom() has not yet been called, _satellite.pageBottom() will automatically be called by Launch. While it might make sense for _satellite.pageBottom() to be called automatically after DOMContentLoaded instead of load, there are issues in IE10 that prevent Launch from doing so.

turbine.propertySettings: Object


An object containing the following settings which are defined by the user for the property of the current Launch runtime library:

  • propertySettings.domains: Array<String>

    An array of domains that the Launch property covers.

  • propertySettings.trackingCookieName: string

    In the European Union, websites are required to allow users to opt out of tracking. When a user on a website opts out of being tracked, the website will need to set a cookie whose name is the value of trackingCookieName. The website will set the cookie’s value to "false" if the user has opted out of tracking and "true" otherwise. If your extension is capable of tracking a user and needs to support user opt-out, it should check that the value of the cookie is "true" before tracking the user.

  • propertySettings.linkDelay: number

    When a user clicks a link, the browser can often navigate to the new location before rules attached to the click event are able to fully execute. This can be problematic if, for example, a rule is supposed to send a beacon to a server when a user clicks a link. By delaying the navigation for a period of time, it can give the rule sufficient time to execute before the user is navigated to the new location.

    If your extension exposes an event type that is based on a user clicking an element, it’s advisable that you check to see whether the element clicked is a link and, if so, delay the navigation for the number of milliseconds defined by linkDelay.

  • propertySettings.undefinedVarsReturnEmpty: boolean

    Extension developers should not be concerned with this setting.