- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to track pages in a single page application with Google Analytics?
A Single Page Application (SPA) loads the resources required to navigate throughout the site. This is for the first page load and SPA is a web application or website.
The content loads dynamically when your site’s link is clicked and the user interacts with the page. On load, the data stored in the tracker updates as well.
Update the tracker
ga('set', 'page', '/new-page.html');
Record pageview
Send a pageview immediately after the tracker updates −
ga('send', 'pageview');
Advertisements