All the pages on my website are loaded on ajax request, so they don't have any URLs attached to them other than the domain URL. I want to track each page view in Google analytics. I have tried adding script like this
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-1234567-1"</script>>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-1234567-1');
</script>
But this tracks only home page, How can I make google analytics track my other pages?