Unable to track clicked URLs in Single page application

Hi,
I am using 3.x Matomo version for Single page application. I have added the tracking code into index.htm file along with the specific code to track SPA.
But it just shows the /index whenever any url is hit.
Any lead would be appreciated.