Variable Basics

Variables represent values obtained from the user browser session, the page being visited, or other aspects of the environment. Variables can also be constants or contain JavaScript snippets to give them more intelligence.

Once a variable has been created it will be available to use in both rules and tags.  To add a variable to a rule simply select it from the drop down, similar to adding any of the default conditions.  New variables are added to the top of the list after they are created.

To add a variable to a tag write the variable name in the tag where it is supposed to be inserted between two sets of brackets.  For example, to add a variable called "custom_variable1", add {{custom_variable1}} in the tag.  The variable will be evaluated before the tag runs, so custom variables for ad slot names or URLs can be used to customize a tag.

Variable topics:

 

New variable


Creating variables

1. On the Dashboard, click New variable.

New variable

The New tag window is displayed. Required items are marked with an asterisk.

2. Type a unique name for the variable in the Name box.

Name

3. Choose the type of variable you want to create from the Type list.

Type

    • URL
    • Constant
    • Variable
    • JavascriptCode
    • DataVariable
    • DOMText
    • DOMAttribute
    • Cookie

4. Complete the variable as required by the type you selected. Use the tooltips in Trusted Data Interchange (TDI) for more information.

5. Click Create to create the variable and return to the Dashboard.

 

System variables

TDI contains a number of system-defined variables that do not require setup. When creating a custom variable, do not use the following built-in variable names:

  • Event
  • Language.base
  • Language.city
  • Location.country
  • Location.region
  • Location.whole
  • Rand
  • Referrer
  • UA
  • URL.hash
  • URL.hostname
  • URL.pathname
  • URL.port
  • URL.protocol
  • URL.search
  • URL.whole
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.