/tagmanager/community?hl=en
This content is likely not relevant anymore. Try searching or browse recent questions.
Incorrect Page Title for pageviews sent using history listener
1
I have an SPA and am using a history change trigger, (history source contains pushState) to send page views to GA, with a  standard Pageview Tag (ie it sets no fields etc).

When I look at the real-time content report in GA as I navigate around the site, the pages are correct, but the page title are incorrect and always the title of the previous page.

You can see from the screenshot below for example that dashboard/2 has three different page titles from each time that page has been navigated to from a different page.

The DL value of the a history event are below. 

Any thoughts as to what the problem could be? Many thanks in advance.
Details
Pinned
Locked
Latest Update Latest Updates (0)
Relevant Answer Relevant Answers (0)
All Replies (3)
Relevant Answer
As a further update, I added a JS Variable called "JS - Page View" which I set to document.title. I can see in preview mode that this is set to the previous page title and I can see in chrome dev tools under elements, that the page title element has been set correctly ie the page title variable on the history event is not the new page title but the previous page title.

Any ideas would be fantastic.
marked this as an answer
Relevant Answer
Hi, you are correct, the URL was being set before the page title was being updated. It has now been fixed, though not sure how.
marked this as an answer
This question is locked and replying has been disabled.
Discard post? You will lose what you have written so far.
Write a reply
10 characters required
Failed to attach file, click here to try again.
Discard post?
You will lose what you have written so far.
Personal information found

We found the following personal information in your message:

This information will be visible to anyone who visits or subscribes to notifications for this post. Are you sure you want to continue?

A problem occurred. Please try again.
Create Reply
Edit Reply
This will remove the reply from the Answers section.
Notifications are off
Your notifications are currently off and you won't receive subscription updates. To turn them on, go to Notifications preferences on your Profile page.
Report abuse
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
Report post
What type of post are you reporting?
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
This reply is no longer available.
/tagmanager/threads
//accounts.google.com/ServiceLogin
You'll receive email notifications for new posts at
Unable to delete question.
Unable to update vote.
Unable to update subscription.
You have been unsubscribed
Deleted
Unable to delete reply.
Removed from Answers
Removed from Updates
Marked as Recommended Answer
Marked as Update
Removed recommendation
Undo
Unable to update reply.
Unable to update vote.
Thank you. Your response was recorded.
Unable to undo vote.
Thank you. This reply will now display in the answers section.
Link copied
Locked
Unlocked
Unable to lock
Unable to unlock
Pinned
Unpinned
Unable to pin
Unable to unpin
Marked
Unmarked
Unable to mark
Reported as off topic
Known Issue
Fixed
Marked Fixed
Unmarked Fixed
Unable to mark fixed
Unable to unmark fixed
/profile/0
false
Search
Clear search
Close search
Google apps
Main menu
Search Help Center
true
102259
false