-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How to have a custom page title sent to GA ? #8
Comments
Hello, the pageview method, is nothing more than an "alias" of https://developers.google.com/gtagjs/reference/event#page_view have you tried to use it instead? ga4react .gtag ('event', 'page_view', { let me know |
I tried with Setting page title through GA methods dynamically did not work. Let me know, in case you can think of any other solution. |
For SPA-like sites, the google documentation indicates this solution: but there is no mention of the title of the document. Maybe try to configure google analytics as shown here: |
Appreciate swift responses, @unrealmanu But this also doesn't works. If two pages are navigated in an interval less than 2-3 secs, the last page viewed is sent to GA (which is expected), but with incorrect title. Let me know, in case any other approach. Thanks |
By default, from GA documentation, the page title which is being sent to GA (on a page view) is
document.title
.The below code to provide custom title works inconsistently.
The title being sent to GA is mostly empty, and sometimes, the page location is sent. Assigning it to a separate variable, just before pageview also doesn't helps.
Anything missed here ?
The text was updated successfully, but these errors were encountered: