toLowercase in DTM | Community
Skip to main content
analytics101
Level 2
June 27, 2018
Solved

toLowercase in DTM

  • June 27, 2018
  • 1 reply
  • 1232 views

How long does it take to convert Uppercase data stored in a prop to a lowercase value in some other evar or list variable. Have implemented tolowercase in DTM

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 jantzen_b

DTM doesn't natively contain a toLowercase function. Thankfully, JavaScript does, and it can be implemented fairly easily. As far as how long it takes, it should be almost instantly.

If you have data on the page you are sending via DTM you can simply use a data element to grab that data and send it through Javascript's toLowercase function. For example, if you wanted to use lowercase page names you could create a data element with the following code:

document.title.toLowerCase()

This data element would retrieve the page title and convert it to all lowercase and store the value in your data element. You could then reference that data element in your rules using the data element picker or the % syntax.

1 reply

jantzen_b
Adobe Employee
jantzen_bAdobe EmployeeAccepted solution
Adobe Employee
July 9, 2018

DTM doesn't natively contain a toLowercase function. Thankfully, JavaScript does, and it can be implemented fairly easily. As far as how long it takes, it should be almost instantly.

If you have data on the page you are sending via DTM you can simply use a data element to grab that data and send it through Javascript's toLowercase function. For example, if you wanted to use lowercase page names you could create a data element with the following code:

document.title.toLowerCase()

This data element would retrieve the page title and convert it to all lowercase and store the value in your data element. You could then reference that data element in your rules using the data element picker or the % syntax.