nfl / react-helmet

A document head manager for React
MIT License
17.34k stars 660 forks source link

Hitting the back button doesn't update the "Active Page" url in Google Analytics when using React Helmet #650

Open eddythemeddy opened 3 years ago

eddythemeddy commented 3 years ago

Hi there I have used React Helmet quite a bit on my platform but I am having an issue here. When I click on a link and visit it, both the title and page url change perfectly on Google Analytics. However when I click the back button, which will take me to my previous component, the the page url doenst change.

I do have a window.history.pushState on that first component. What am I doing wrong? Do I need to do something special when it comes to push state and react-helmet?

Thank you in advance.