Go to Qubit

Opentag documentation

Web API – Specification

Below is the full specification for the publically-available Opentag Web API. This is a RESTful API that returns data in the JSON format.

Authentication is provided via cookies, as documented here. All routes below specify a path which assumes a base URL of https://opentag.qubitproducts.com/QDashboard/qtag/.

For usage examples please see here.

Contents

Routes

Common Objects

Routes

Get category

GET /category

Lists all library script categories

Response

Returns: array of Category

Get client

GET /client/{identifier}

Retrieves a client by its ID

Request

Path Params

Property Type Description
identifier string Client ID

Response

Returns: Client

Add client

POST /client

Creates a new client

Request

Form Params

Property Type Description
name string Name to assign client

Response

Returns: Client

Alter client

PUT /client/{identifier}

Performs changes to the client name or state

Request

Path Params

Property Type Description
identifier string Client ID

Form Params

Property Type Description
name string New name for client
active boolean If true will activate the client

Response

Returns: void

Inactivate client

DELETE /client/{identifier}

Deactivates a client

Request

Path Params

Property Type Description
identifier string Client ID

Response

Returns: void

Get client profiles

GET /client/{identifier}/profile

Retrieves all profiles/containers for a client

Request

Path Params

Property Type Description
identifier string Client ID

Response

Returns: array of Profile

Get client profile by id

GET /client/{clientIdentifier}/profile/{profileIdentifier}

Retrieves a singular profile

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID

Response

Returns: Profile

Get client profile variables

GET /client/{clientIdentifier}/profile/{profileIdentifier}/variable

Retrieves all page variables for the profile

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID

Response

Returns: array of PageVariable

Array actually contains a mixture of CustomVariable and UniversalVariable, both of which implement all properties of PageVariable

Add profile to client

POST /client/{clientIdentifier}/profile

Creates a new profile under a client

Request

Path Params

Property Type Description
clientIdentifier string Client ID

Form Params

Property Type Description
name string Profile name
cookieDomain string Cookie domain
zipped boolean Enable/disable gzip compression
delayDocWrite boolean Enable/disable delayed document.write usage

Response

Returns: Profile

Alter profile

PUT /client/{clientIdentifier}/profile/{profileIdentifier}

Changes a profile/container

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID

Form Params

Property Type Description
name string Profile name
cookieDomain string Cookie domain
active boolean Activate/deactivate the container
zipped boolean Enable gzip compression
notZipped boolean Disable gzip compression
setDelayDocWrite boolean Enable delayed document.write usage
setDoNotDelayDocWrite boolean Disable delayed document.write usage
setShowCommitFinishedPrompt boolean Enable post-commit UI prompt
setDontShowCommitFinishedPrompt boolean Disable post-commit UI prompt
maxCookieLength integer Maximum cookie length allowed for Opentag

Response

Returns: void

Duplicate profile

POST /client/{clientIdentifier}/profile/{profileIdentifier}

Duplicates an entire profile/container

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID to duplicate

Form Params

Property Type Description
name string Name for new profile

Response

Returns: Profile

Write all profiles to s3

POST /client/{clientIdentifier}/profile/scriptwriter

Commits all profiles/containers for a client to S3 (and Cloudfront)

Request

Path Params

Property Type Description
clientIdentifier string Client ID

Response

Returns: integer

Save profile

PUT /client/{clientIdentifier}/profile/{profileIdentifier}/scriptwriter

Commits an individual profile/container to S3 (and Cloudfront)

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID

Response

Returns: integer

List save history

GET /client/{clientIdentifier}/profile/{profileIdentifier}/savehistory

Retrieves the save history for a profile

Request

Path Params

Property Type Description
clientIdentifier integer Client ID
profileIdentifier integer Profile ID

Response

Returns: array of SaveHistoryItem

Get current script name for profile

GET /client/{clientIdentifier}/profile/{profileIdentifier}/scriptName

Retrieves the Cloudfront URL for a profile’s Opentag script

Request

Path Params

Property Type Description
clientIdentifier integer Client ID
profileIdentifier integer Profile ID

Response

Returns: string

URL is returned without protocol

List changes

GET /client/{clientIdentifier}/profile/{profileIdentifier}/changes

Retrieves the changes made for a previous profile ID. Every time you commit, a new internal profile ID is created. These can be retrieved using the List save history route.

Request

Path Params

Property Type Description
clientIdentifier integer Client ID
profileIdentifier integer Previous profile ID

Response

Returns: string

Returns an array of changelog JSON data

Revert profile

DELETE /client/{clientIdentifier}/profile/{profileIdentifier}/changes

Reverts all pending (uncommitted) changes to a profile

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID

Response

Returns: Profile

Get profile script

GET /client/{clientIdentifier}/profile/{profileIdentifier}/getscript

Returns the entire compressed JavaScript build for the profile

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID

Response

Returns: string

Inactivate profile

DELETE /client/{clientIdentifier}/profile/{profileIdentifier}

Deactivates a profile/container

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID

Response

Returns: void

Get profile save state

GET /client/{clientIdentifier}/profile/{profileIdentifier}/scriptwriter

Reports the current save state of a profile

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID

Response

Returns: integer

  • 2: Complete
  • 1: In progress
  • 0: Not started
  • -1: Error

Alter script

PUT /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script/{scriptIdentifier}

Modify a script/tag in a profile

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID
scriptIdentifier string Script ID

Form Params

Property Type Description
name string Script name
active string Activate/deactivate the script (boolean)
url string URL of script to load (must have either URL or HTML)
pre string Script to be executed before URL (optional)
post string Script to be executed after URL (optional)
html string HTML of script (must have either URL or HTML)
async string Should the script be executed async or sync (boolean)
usesDocWrite string Does the URL or HTML contain document.write calls (boolean)
dedupe string Enable/disable dedupe filters + reporting for the script (boolean)
needsConsent string Only fire the tag if cookie consent has been granted (boolean)
locationId integer See ScriptDetail
positionId integer See ScriptDetail
locationDetail string See ScriptDetail (optional)
scriptTimeout integer Interval to wait for script parameters to be ready before timing out

Response

Returns: void

Convert to templated

PUT /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script/{scriptIdentifier}/convertToTemplated

Convert a script to use a template instead of custom URL/HTML

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID
scriptIdentifier string Script ID

Form Params

Property Type Description
templateId integer Script template ID – see ScriptTemplate

Response

Returns: ScriptDetail

Convert to custom

PUT /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script/{scriptIdentifier}/convertToCustom

Convert a script to use custom URL/HTML instead of a template

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID
scriptIdentifier string Script ID

Response

Returns: ScriptDetail

Add variable to custom script

POST /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script/{scriptIdentifier}/customparam

Adds a tokenized parameter to a custom script

Request

Path Params

Property Type Description
clientIdentifier integer Client ID
profileIdentifier integer Profile ID
filterGroupIdentifier integer Filter group ID
scriptIdentifier integer Script ID

Form Params

Property Type Description
customVarId integer ID of custom variable (must have either customVarId or universalVarId)
universalVarId integer ID of Universal Variable parameter (must have either customVarId or universalVarId)
name string Name of variable/parameter
token string Token to be substituted
defaultValue string Default value (optional)

Response

Returns: CustomParamValue

Alter templated script param

PUT /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script/{scriptIdentifier}/param/{paramIdentifier}

Change a template parameter for a templated script

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID
scriptIdentifier string Script ID
paramIdentifier string Script param ID

Form Params

Property Type Description
customVarId integer ID of custom variable (must have either customVarId or universalVarId)
universalVarId integer ID of Universal Variable parameter (must have either customVarId or universalVarId)
defaultValue string Default value (optional)

Response

Returns: void

Alter custom variable

PUT /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script/{scriptIdentifier}/customparam/{paramIdentifier}

Change a custom parameter of a custom script

Request

Path Params

Property Type Description
clientIdentifier integer Client ID
profileIdentifier integer Profile ID
filterGroupIdentifier integer Filter group ID
scriptIdentifier integer Script ID
paramIdentifier integer Script param ID

Form Params

Property Type Description
customVarId integer ID of custom variable (must have either customVarId or universalVarId)
universalVarId integer ID of Universal Variable parameter (must have either customVarId or universalVarId)
name string Name of variable/parameter
token string Token to be substituted
defaultValue string Default value (optional)

Response

Returns: boolean

Delete custom script param

DELETE /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script/{scriptIdentifier}/customparam/{paramIdentifier}

Remove a custom parameter from a custom script

Request

Path Params

Property Type Description
clientIdentifier integer Client ID
profileIdentifier integer Profile ID
filterGroupIdentifier integer Filter group ID
scriptIdentifier integer Script ID
paramIdentifier integer Script param ID

Response

Returns: boolean

Get profile scripts

GET /client/{clientIdentifier}/profile/{profileIdentifier}/script

Retrieves all scripts/tags for a profile

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID

Response

Returns: array of Object

Return value is actually an array of couples (two-element arrays). Each couple consists of a filter group ID (index 0) and a Script object (index 1)

Get filter groups

GET /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup

Retrieves all filter groups for a profile

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID

Response

Returns: array of FilterGroup

Get filter group

GET /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}

Retrieves an individual filter group

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID

Response

Returns: FilterGroup

Add filter group

POST /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup

Adds a new filter group to a profile

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID

Form Params

Property Type Description
name string Name for the filter group
priority integer Always set to 1 (has no effect)

Response

Returns: FilterGroup

Alter filter group

PUT /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}

Modifies a filter group

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID

Form Params

Property Type Description
name string Updated name for the group
priority integer Always set to 1 (has no effect)

Response

Returns: void

Get filter group filter

GET /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/filter

Retrieves all the filters for a filter group

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID

Response

Returns: array of Filter

Add filter group filter

POST /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/filter

Adds a new filter to a filter group

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID

Form Params

Property Type Description
patternName string Name for this filter
patternText string Value of the filter
patternTypeId integer Pattern type ID – see Get pattern types
priority integer Filter priority. Filters are executed low to high, so high priority = higher number
filterTypeId string Filter type ID – see Get filter types

Response

Returns: Filter

Alter filter

PUT /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/filter/{filterId}

Changes a filter inside a filter group

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID
filterId integer Filter ID

Form Params

Property Type Description
priority integer Filter priority. Filters are executed low to high, so high priority = higher number
filterTypeId integer Filter type ID – see Get filter types
patternText string Value of the filter
patternName string Name of the filter
patternTypeId integer Pattern type ID – see Get pattern types

Response

Returns: void

Delete filter group filter

DELETE /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/filter/{filterId}

Remove a filter from a filter group

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID
filterId integer Filter ID

Response

Returns: void

Get filter group scripts

GET /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script

Retrieves all the scripts for a filter group

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID

Response

Returns: array of Script

Get filter group script

GET /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script/{scriptIdentifier}

Retrieves a single script from a filter group

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID
scriptIdentifier string Script ID

Response

Returns: ScriptDetail

Add script to filter group

POST /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script

Adds a new script to a filter group

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID

Form Params

Property Type Description
name string Script name
active string Activate/deactivate the script (boolean)
scriptId integer Script template ID – see ScriptTemplate
params string JSON map (in string form) of script param IDs to param value objects, where param object has the following keys:
  • id: script param ID
  • defaultValue: default value (optional)
  • customVarId: custom variable ID (optional)
  • universalVarId: universal variable ID (optional)

Must have one of either customVarId or universalVarId

url string URL of script to load (must have either URL or HTML)
pre string Script to be executed before URL (optional)
post string Script to be executed after URL (optional)
html string HTML of script (must have either URL or HTML)
async boolean Should the script be executed async or sync (boolean)
usesDocWrite boolean Does the URL or HTML contain document.write calls (boolean)
dedupe boolean Enable/disable dedupe filters + reporting for the script (boolean)
needsConsent boolean Only fire the tag if cookie consent has been granted (boolean)
locationId integer See ScriptDetail
positionId integer See ScriptDetail
locationDetail string See ScriptDetail (optional)
scriptTimeout integer Interval to wait for script parameters to be ready before timing out

Response

Returns: ScriptDetail

Inactivate script

DELETE /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script/{scriptIdentifier}

Deactivates a script

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID
filterGroupIdentifier string Filter group ID
scriptIdentifier string Script ID

Response

Returns: void

Get custom variables

GET /client/{clientIdentifier}/profile/{profileIdentifier}/customvar

Retrieves all the custom variables for a profile

Request

Path Params

Property Type Description
clientIdentifier string Client ID
profileIdentifier string Profile ID

Response

Returns: array of CustomVariable

Add custom variable

POST /client/{clientIdentifier}/profile/{profileIdentifier}/customvar

Adds a new custom variable to a profile

Request

Path Params

Property Type Description
clientIdentifier integer Client ID
profileIdentifier integer Profile ID

Form Params

Property Type Description
valueName string Name of the variable
value string Variable value
typeId integer Custom variable type ID. See CustomVariable

Response

Returns: CustomVariable

Save custom variable

PUT /client/{clientIdentifier}/profile/{profileIdentifier}/customvar/{customVariableIdentifier}

Updates a custom variable

Request

Path Params

Property Type Description
clientIdentifier integer Client ID
profileIdentifier integer Profile ID
customVariableIdentifier integer Custom variable ID

Form Params

Property Type Description
valueName string Variable name
value string Variable value
typeId integer Custom variable type ID. See CustomVariable

Response

Returns: boolean

Delete custom variable

DELETE /client/{clientIdentifier}/profile/{profileIdentifier}/customvar/{customVariableIdentifier}

Deletes a custom variable

Request

Path Params

Property Type Description
clientIdentifier integer Client ID
profileIdentifier integer Profile ID
customVariableIdentifier integer Custom variable ID

Response

Returns: boolean

Add script dependency

POST /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script/{scriptIdentifier}/dependency

Makes a child script depend on a parent

Request

Path Params

Property Type Description
clientIdentifier integer Client ID
profileIdentifier integer Profile ID
filterGroupIdentifier integer Filter group ID of child script
scriptIdentifier integer Child script ID

Form Params

Property Type Description
filterGroupId integer Filter group ID of parent script
scriptId integer Parent script ID

Response

Returns: boolean

Delete script dependency

DELETE /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script/{scriptIdentifier}/dependency/{parentScriptIdentifier}

Removes a child-parent dependency

Request

Path Params

Property Type Description
clientIdentifier integer Client ID
profileIdentifier integer Profile ID
filterGroupIdentifier integer Filter group ID of child
scriptIdentifier integer Script ID of child
parentScriptIdentifier integer Script ID of parent

Response

Returns: boolean

Copy to different profile

PUT /client/{clientIdentifier}/profile/{profileIdentifier}/filtergroup/{filterGroupIdentifier}/script/{scriptIdentifier}/copy/{newProfileIdentifier}

Copies an individual script to a new profile

Request

Path Params

Property Type Description
clientIdentifier integer Client ID
profileIdentifier integer Profile ID
filterGroupIdentifier integer Filter group ID
scriptIdentifier integer Script ID
newProfileIdentifier integer Target profile ID

Form Params

Property Type Description
copyDependencies boolean Whether or not to copy script dependencies (always non-recursive)

Response

Returns: ScriptDetail

Get filter types

GET /filtertype

Retrieves all possible filter types

Response

Returns: array of FilterType

Get pattern types

GET /patterntype

Retrieves all possible pattern types

Response

Returns: array of PatternType

Get scripts

GET /script

Retrieves all library scripts in a category for use in templated scripts

Request

Query Params

Property Type Description
category string Category – see getCategory

Response

Returns: array of ScriptTemplate

Get script

GET /script/{identifier}

Retrieves an individual script from the library

Request

Path Params

Property Type Description
identifier string Library script ID

Response

Returns: ScriptTemplateDetail

Get universal var

GET /universalvar

Gets all Universal Variable params

Response

Returns: array of UniversalVariable

Get vendor

GET /vendor

Lists all vendors available in the library

Response

Returns: array of Vendor

Common Objects

Category

A category represents a group of library templates, e.g. remarketing tags

Property Type Description
id integer Category ID
name string Name of the category

Client

Top level representation of a client, synonymous with the concept of an ‘account’

Property Type Description
id integer Client ID
name string Client name
active boolean Active state

CustomParamValue – extends ParamValue

Identical to ParamValue but used for custom scripts (non-library)

CustomVariable – extends PageVariable

Custom Variables are values used to fulfill script parameters

Property Type Description
id integer Custom Variable ID
typeId integer Select from:
  1. Hard-coded value
  2. JavaScript expression
  3. Query parameter
  4. Cookie value
  5. DOM Text
name string Name of Custom Variable
value string Custom Variable value

Filter

A filter is the collection of a pattern, priority and type. Together this is represents a singular ‘rule’

Property Type Description
id integer Filter ID
pattern Pattern Pattern for this filter. See Pattern
priority integer Filter priority. Filters are executed low to high, so high priority = higher number
filterTypeId integer See FilterType

FilterGroup

Filter groups are currently not ‘used’ in Opentag (i.e. you can’t control them in the UI), but are still required. Each filtergroup must have one filter, and each script must belong to a filter group.

Property Type Description
id integer Filter group ID
name string Filter group name (normally set as the script name)
priority integer Currently changing this won’t have an effect, so it is best to leave it at 1

FilterType

At the moment there are only two filter types: include and exclude.

Property Type Description
id integer Filter type ID
name string Filter type name

PageVariable

This is an abstraction for all page variables. Actual instances of page variables will implement either CustomVariable or UniversalVariable

Property Type Description
usageCount integer Number of times this variable is used in scripts
id integer Variable ID

ParamValue

Describes a tokenized script parameter value in a library template. For non-library scripts, see CustomParamValue.

Property Type Description
id integer Parameter ID
token string Script token to be substituted. In the script this is wrapped in ${token} however in this object it should appear without ${}
paramName string Name of the parameter
valueName string Name of the value (same as the scriptParam name)
scriptParam ScriptParam Script parameter value details
defaultValue string Optional default value

Pattern

Patterns are a subcomponent of a filter that control the matching process. Each filter has a pattern.

Property Type Description
id integer Pattern ID
name string Pattern name
pattern string Pattern value
patternTypeId integer Pattern type ID – see PatternType

PatternType

Pattern type describes what is contained in a pattern value. For each basic pattern type there is a duplicate for use with dedupe. To list all pattern types, see Get pattern types.

Property Type Description
id integer Pattern type ID
name string Pattern type name

Profile

Also known as a container, a profile represents a single collection of tags that get built into a single JavaScript file.

Property Type Description
id integer Profile ID
name string Profile name
cookieDomain string Cookie domain
invalidationToken integer Irrelevant, ignore.
dirty boolean Indicates whether there are pending changes on the profile (i.e. uncommitted)
active boolean Whether the profile is active/deactivated
scriptName string URL (without protocol) of the built profile script hosted on Cloudfront
version integer Current version number of the container
delayDocWrite boolean Where delayed document.write usage is enabled on the profile
showCommitFinishedPrompt boolean If true will allow finished commit prompts in the UI
maxCookieLength integer Maximum cookie length. Default is 3000.
zipped boolean If true, gzip compression will be used on the built JavaScript file

SaveHistoryItem

A save history item is created every time a container is committed.

Property Type Description
version integer Profile version number
activeTags integer Number of active tags
inactiveTags integer Number of inactive tags
creationDate integer Timestamp indicating the creation date of the history item
lastSavedDate integer Timestamp indiciating the last saved date of the history item
author string Author’s email address
profileId integer Profile ID
timestamp integer Current timestamp

Script

Basic information about an individual script. More information is provided by ScriptDetail

Property Type Description
id integer Script ID – changes when the script is edited/committed
masterId integer Master script ID – always stays the same
name string Script name
active boolean Whether the script is active or not
async boolean Controls if the script is synchronously or asynchronously executed
dedupe boolean Enable/disable dedupe mode on the script. This changes how filters are treated.
needsConsent boolean Does the script require cookie consent before it can fire?
childDependencies array of integer IDs of child scripts (dependents)
parentDependencies array of integer IDs of parent scripts (dependees)

ScriptDetail – extends Script

More granular information about a script

Property Type Description
usesDocWrite boolean If true, Opentag will attempt to make calls to document.write ‘safe’ in the script
url string URL of script file to load (must have this or html)
pre string Code to execute before loading URL
post string Code to execute after loading URL
html string HTML of script to execute (must have this or url)
substitutedUrl string URL after tokens have been substituted with instances of ParamValue
substitutedPre string Pre after tokens have been substituted with instances of ParamValue
substitutedPost string Post after tokens have been substituted with instances of ParamValue
substitutedHtml string HTML after tokens have been substituted with instances of ParamValue
locationId integer
  1. Head
  2. Body
  3. Div ID as specified by locationDetail
positionId integer
  1. Beginning
  2. End
locationDetail string Div ID, only used if locationId is 3
paramValues array of ParamValue Parameters to substitute into the script for tokens
scriptTimeout integer Millisecond timeout of the script. Defaults advised is 5000

ScriptParam

Abstract representation of a script parameter. Extended by other objects such as UniversalScriptTemplatedParam

Property Type Description
id integer Script param ID
paramName string Parameter name
valueName string Value name

ScriptTemplate

Basic information about a library script template

Property Type Description
id integer Script template ID
name string Template name
description string Description of the template
imageUrl string Vendor logo URL
vendorId integer Vendor ID – see Vendor

ScriptTemplateDetail – extends ScriptTemplate

More granular information about a script template

Property Type Description
url string URL of script file to load (must have this or html)
pre string Code to execute before loading URL
locationId integer
  1. Head
  2. Body
  3. Div ID as specified by locationDetail
positionId integer
  1. Beginning
  2. End
locationDetail string Div ID, only used if locationId is 3
post string Code to execute after loading URL
html string HTML of script to execute (must have this or url)
parameters array of UniversalScriptTemplatedParam Tokenized parameters used by the template
categoryId integer See Category
async boolean Controls if the script is synchronously or asynchronously executed
usesDocWrite boolean If true, Opentag will attempt to make calls to document.write ‘safe’ in the script
private boolean If true, this library tag is only visible in the library to Opentag admins. This normally indicates deprecation or testing

UniversalScriptTemplatedParam – extends TemplatedScriptParam

A Universal Variable parameter as used in a library template

Property Type Description
valueName string Name of the value in context of the template
jsName string Universal Variable object path, e.g. universal_variable.transaction.order_id
universalVarDescription string Description of the universal variable value

UniversalVariable – extends PageVariable

Standard Universal Variable parameter as useds in library templates and custom scripts

Property Type Description
id integer Universal variable ID
name string Name of the parameter
jsName string Universal Variable object path, e.g. universal_variable.transaction.order_id
description string Description of the variable

Vendor

Each library script belongs to a Vendor

Property Type Description
id integer Vendor ID
name string Vendor name
description string Vendor description

Was this helpful?