Custom Variables

Overview

Set up custom variables for your Smart Tags to capture data based on unique JavaScript variables, cookies, or even content on a page.

Before You Start

Before creating the custom variable, you must generate Smart Tags and establish event conditions for collecting the data.

Viewing Custom Variables

  1. Navigate to the menu located on the left-hand side. The DSP shows a menu for Advertisers and Admin.

  2. Select the Account that contains your advertiser, and then select your Advertiser.

  3. After selecting a single advertiser, click on  Data Collection > Custom Variables.


  4. The platform will display a grid like the following. The columns are described below.

The above screenshot does not display any Custom Variables associated with the selected Advertiser. If the Advertiser did have custom variables created, they would appear on this page, similar to the screenshot below. 

Search for Custom Variables

Click the Search icon in the upper left-hand corner and then enter your search term. Only the variables with the search term are displayed.
Click x next to the search term to clear your search.

Filter Custom Variables

Click the Filter icon in the upper left-hand corner to view the filtering options.

Custom Variable Column Descriptions

The following table lists the columns that can appear on this page.

Column

Description

Variable

User-generated name for each variable.

ID

System-generated ID for each variable.

Data Capture Method

Displays the data capture method for the variable. See below for more information on the various capture methods.

Input Variable

Indicates if the event will trigger setting an attribute. For more information, see DSP Smart Tags.

Created

Creation date for the variable.

Created By

User who created the variable.

Modified

Date of the last modification.

Modified By

User who made the last modification.

View or Edit a Smart Tag Custom Variable

  1. Click a Custom Variable name in grid to view the Smart Tag Custom Variable window.

  2. The Smart Tag Custom Variable window shows the details on the variable.

  3. Optional: Click Edit to modify the Smart Tag Custom Variable. 

Smart Tag Custom Variable Fields

Item

Required

Description

Basic Settings



Variable Name

Yes

User-generated name for each variable.

Data Ingestion Mapping



DMP Data Element

No

The DMP data element that will be modified by the smart tag. The exact way this field is modified depends on the Data Capture method (see below).

DSP Data Parameter

No

The DsP data parameter that will be modified by the smart tag. The exact way this parameter is modified depends on the Data Capture method (see below).

Data Capture



Data Capture Method

Yes

Available capture methods include:

  • JavaScript Variable on Page: Capture the value of the JavaScript variable. See js for details.

  • Cookie Data: Capture the content of the named client-side cookie

  • Content on Page: Capture the value of an element id on the page

  • Query String: Capture the value of the specified string

  • Transformation of Content on Page: If using the Content on Page capture method, additional options allow for filtering/transforming content such that only numbers or, more specifically, numbers with decimal places can be captured and stored.

Input Variable Name

Yes

Enter the advertiser's variable name for the variable type above.

Condition Assignments



DMP Usage

N/A

This read-only field shows which tags are using this custom variable.

DSP Usage

N/A

This read-only field shows which tags are using this custom variable.

Create a New Custom Variable

  1. Click + Custom Variable in the upper-right corner of the grid to view the Create Smart Tag Custom Variable window.

  2. Complete the fields on the window.

  3. Save when complete.


Delete a Custom Variable

  1. Hover over a Custom Variable name to display the (...) menu.

  2. Hover over the (...) menu and then click Delete.

Export a Custom Variable

Click the Export icon in the upper right-hand corner of the screen. The DSP will generate a CSV file containing your custom variables using all displayed columns.

Locating JavaScript Variables

Each advertiser uses its own variables. Thus you must locate the variables on the page. We suggest using the Developer Console built into Google Chrome (press F12 to open the Developer Tools and select Console).

In the example below, the variable window.urlclean contains mustang. You can use the variable name to identify that the site visitor has been to this particular page, and write to the specific attribute.

Zeta Recommends that as a best practice when referencing the variable, "window." is prepended. So the variable urlclean in this example should be references as window.urlclean.