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

Get JS var From Markup

Avatar

Level 4

Hi, Let's say I'm trying to pass a var that's in the markup like so:

, into a data element? Thanks, Leo S.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Leo,

I'm not seeing how the var is in the markup. Can you try attaching a screenshot by using the picture widget inside the editor? You should be able to pull just about anything from the page into a data element given the correct JavaScript.

Thanks,
Jantzen

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi Leo,

I'm not seeing how the var is in the markup. Can you try attaching a screenshot by using the picture widget inside the editor? You should be able to pull just about anything from the page into a data element given the correct JavaScript.

Thanks,
Jantzen