Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

toLowercase in DTM

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Level 10

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

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.