PRODUCT
Follow
  • 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.

      DOC_ConcertDataLayerExample.png

      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:

      ChromeToolConsoleTab.png
    • Query String Variable

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

      www.concertified.com/shopingCart?purchaseAmount=200&concertID=1234
                        

      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

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

  2. Click New Variable.

    NewVariable2019.gif
  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, www.concertified.com/search?q=The+Trading+Band.

  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.

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

  2. From the Variables list, select a variable.

    Note

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

  3. Click Show Usages.

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

    ShowUsages2019.gif
  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

Comments