How do I use the Set Data Values extension to set a variable to another variable + plain text?

Silver Contributor
Silver Contributor
I would like to set the variable "page_id" to a plain text string + the dom.pathname. Example: URL is http://www.example.com/clothing/dresses/summer/ I would like the "page_id" variable to be "AB:/clothing/dresses/summer/"
3 REPLIES 3

How do I use the Set Data Values extension to set a variable to another variable + plain text?

Employee Emeritus
Hi Jason. You would set it to custom JS code option and set it to "yourtext" + utag.data['dom.pathname'] .

How do I use the Set Data Values extension to set a variable to another variable + plain text?

Employee Emeritus
Also attaching an example screenshot

How do I use the Set Data Values extension to set a variable to another variable + plain text?

Silver Contributor
Silver Contributor
Beautiful! Thanks for the help!
Public