Setting dynamic data in DTM | Community
Skip to main content
Erika_Barber
Employee
October 16, 2015
Solved

Setting dynamic data in DTM

  • October 16, 2015
  • 1 reply
  • 2107 views

Within the Rules or Global Variables, can you set eVars etc. only to a string or can you set it to a JS variable or something?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Erika_Barber

You can use the %var% syntax to include Javascript variables.  First setup a Data Element in DTM.  Then you can insert the name of your Data Element between percent signs in a rule or your Analytics setup and DTM will dynamically populate the value.  You have several ways to define a Data Element, one of which is a JS object.

1 reply

Erika_Barber
Erika_BarberAuthorAccepted solution
Employee
October 16, 2015

You can use the %var% syntax to include Javascript variables.  First setup a Data Element in DTM.  Then you can insert the name of your Data Element between percent signs in a rule or your Analytics setup and DTM will dynamically populate the value.  You have several ways to define a Data Element, one of which is a JS object.