Grab nested value with datalayer variable

Hello support community,

I am currently struggling with datalayer variables in Matomo Tag Manager.

HTML Code snippet from website:
...<a href="" class="hero__item -gtm-hero-trigger" data-gtm="click-collect" title="test-title">...

I would like to fetch values from nested objects via datalayer variables, but without any success.
datalayer variable name 1 → element.title
datalayer variable name 2 → element.dataset.gtm

What I am doing wrong?

Looking forward to hear from you.
Best regards,
Sebastian Höbler

Hi @sebastian.hoebler
Do you use Matomo Tag Manager or Google Tag Manager?
How did you configure your datalayer variables exactly? (please provide screenshots)

Problem solved with the help of this article: I have choosen the JS solution to access the relevant data.

Hi @sebastian.hoebler
For information, you are using Piwik Pro, this forum is about Matomo :wink: