Contact Form 7 and form submission event

I am used to using GTM, deploying a script to listen for a submission event in the WP plugin Contact Form 7 and then setting the dataLayer event to use as a conversion goal.

I am using this script, but it does not give me any data in the Piwik debug tool. I am expecting to see the event. I checked the doc for the structure, and it seems to be the same: About a data layer | Piwik PRO help center

Anyone having the same issue or know of a solution?

Can you share details about your datalayer setup and how are you checking it in the debug tool?

Hello,

I suspect he refers to this from

<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
 window.dataLayer.push({
 "event" : "cf7submission",
 "formId" : event.detail.contactFormId,
 "response" : event.detail.inputs
 })
}); 
</script>

As an altertative I was thinking of using wpcf7-response-output contains ‘Thank you for your message’ or whatever the successful