• Media > Advertisers > [Advertiser_Name] > Tag Management > Variables

A variable is an entity that allows an advertiser to define from where to extract the data. Using variables prevents the time-consuming activity of asking the advertiser's web developer for every parameter's value.

How Does It Work?

The agency, reallyCoolMedia, which manages Concertified (concert ticket website) on Sizmek, is promoting a new campaign for winter concerts. They want to collect revenue data resulting from this campaign's ads. reallyCoolMedia needs to define a variable for Concertified that corresponds to the purchaseAmount values. These steps include:

  1. The Sizmek user creates a variable with the following attribute:

    Platform Name: Winter Concerts Purchase Amount

  2. For the Type, there are several options:

    • Data Layer Variable

      In this example, Concertified uses this Data Layer object on their web page.


      When the tag manager client code runs on the Concertified website, and a rule exists that triggers the conversion activity purchased_winter, it will fetch the Data Layer object, extract the purchaseAmount, and send it to the server as the revenue value.

      For more information, see About the Data Layer.

    • Global JavaScript Variable

      In this example, Concertified has a global variable on their web page.

      var purchaseAmount=200;

      You can use the Sizmek Chrome™ extension to verify that it exists, or type "window.purchaseAmount" in the console of the Chrome devtool:

    • Query String Variable

      In this example, Concertified has a query string parameter inside the page URL.

      You can check if it exists using the Sizmek Chrome™ extension, or by looking at the page's URL.

  3. In the newly created variable, specify that the Winter Concerts Purchase Amount variable name maps to the purchaseAmount variable on the page.

  4. Create a sales conversion activity for the winter campaign called purchased_winter.

  5. In the Activity Parameters tab, set the default revenue value to purchaseAmount.

Create a Variable

  1. From an advertiser, click Tag Management > Variables.

  2. Click New Variable.

  3. In the Platform (internal) Name text box, enter an internal name that will appear in the Variables list.

  4. In the Type list, select one of these options:

    • Data Layer Variable: Variable passed to Sizmek by the advertiser using the Data Layer object that exists on the web page where the tag manager is implemented.

    • Page JavaScript Variable: Global JavaScript variable that exists on the web page where the tag manager is implemented.

    • URL Query String Param: Variable obtained from the URL query string of the web page where the Tag Manager is implemented. For example,

  5. Select the Data Type.

  6. In the Settings section, type the name. This is the name of the variable on the web page where the Tag Manager is implemented. You should ask the advertiser's webmaster for this name.

  7. Type a Default Value (string or number) for the variable, if required.

  8. Click Save.

You can also use the Chrome™ extension, which scans your web page, to create variables. For more information, see HOW TO: Analyze a Web Page for Variables.

Show Usages and Delete a Variable

You can use the Show Usages feature to see where a variable is used. If you ever want to delete a variable, you must confirm that the variable is not used in any activity or tag manager.

  1. From an advertiser, click Tag Management > Variables.

  2. From the Variables list, select a variable.


    Note: This feature only works for one, selected variable.

  3. Click Show Usages.

  4. Inspect each tab, Tag Managers, Conversion Activities, Retargeting Activities, and 3rd Party Activities to see which tag manager elements use the selected variable.

  5. If you want to delete the variable, you must delete the tag manager or activity that uses the variable, and then delete the variable.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request