Problem with tracking a contact created via API

Your software
My Mautic version is: 4.4.10.

I have this problem when creating a contact using the API:

‘email’ => $email,
‘firstname’ => $name,
‘telephone’ => $phone,
‘ipAddress’ => $ip,
‘overwriteWithBlank’ => true,

The contact is created correctly. However, the problem is that tracking does not work.

After creating the contact, I tried running:

mt(‘send’, ‘identify’, { email: ‘test@test.com’ });

But it didn’t work. I also tried:

mt(‘send’, ‘pageview’, { email: ‘test@test.com’ });

What should I do to make tracking work for a new contact?