Listening for events in the digitalData datalayer object

We use the digitalData datalayer on our website. (see

How can I listen for new events (new objects pushed in the digitalData.event object)?

Hi @rmeekers,

Would it be possible to send us the site URL where we can see the digitalData dataLayer? It can be either here or in a private message.

sure, I’ll send you a PM

There’s no way of listening for new events that appear in the digitalData object using built-in triggers. There are few methods of listening to changes JS objects. You could use them to push a dataLayer event based on the digitalData one or even trigger a Piwik PRO event directly from the listener.

hmm ok, so the best way would be to use the default dataLayer?

Or would it work if I rename the dataLayer?

If possible then yes - it’s usually best to use the dataLayer as it can be accessed by other tools (not only Piwik PRO)

From what I can see, the digitalData object has a bit of a different structure (events are nested) than event based dataLayer, so I’m not sure if just changing the name would work.

ok, I’ll look into it.
Is there any documentation on the structure you use for your datalayer?

I think this one should be helpful:

When it comes to names of dataLayer keys used by Piwik PRO - we will update our documentation as it doesn’t contain those now (and it might be useful in some cases).