-
Notifications
You must be signed in to change notification settings - Fork 71
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
How to get page title for analytics? #6
Comments
Hi @Kinzi and thanks for idea :) Do you mind creating a PR to add support? |
Sure: #8 Seems to work for me but I'm not an expert with this stuff and I'm sure there is a better solution. ;) Had to set a timeout because otherwise it would fetch the last page title not the new one unfortunately... |
Released by 2.2.0: https://github.com/nuxt-community/gtm-module/releases/tag/v2.2.0 |
I'm facing a problem with that timeout. 250ms is not enough for pages, where Edit: I added this code and it works fine. If You guys want i can push it as a pull request. |
Hello @pi0 |
Also facing @jakubm95 issue. The head() function using async data.
The first page load tracks the default title, then every subsequent page load tracks the previous page title. |
I'm mainly using this for analytics stuff. Usually Analytics tracks the page title along with the url.
Anyway the page title can be pushed to the nuxtRoute data layer object on route change? This way I could simply set up a variable for it in GTM
The text was updated successfully, but these errors were encountered: