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