Contact Tracking - pageview doesn't work

Your software
My Mautic version is: 6.0.0
My PHP version is: 8.3.22
My Database type and version is: MariaDB 11.4.7

Your problem

I want to track pageviews and custom events for my existing contacts, but no events are recorded in the system.

I tried to use the script like this:

I can see in network tab the POST event was send succesfully. I also tried incognito mode. If I check my contact there is no page view event.

I don’t know why the code snippet is missing and I cannot edit my question, it’s here:

I tried this:

window.mt(‘send’, ‘pageview’, {
email: ‘john@example.com’,
firstname: ‘John’,
lastname: ‘Doe’
})

and also this:

window.mt(‘identify’, {
email: ‘john@example.com’,
firstname: ‘John’,
lastname: ‘Doe’
})

window.mt(‘send’, ‘pageview’)