-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add Google Analytics Pageview #1198
Conversation
Can you confirm that the script is PJAX compatible? Because |
@stevenjoezhang Is there a PJAX callback for doing that? |
Is it possible to change the function from the callback of the |
@stevenjoezhang Yes, but I wonder whether there's a way to detect if page changed(loaded by PJAX). |
|
This should now work with PJAX now. |
Test passed when pjax enabled, I checked it in analytics realtime panel. |
Maybe combine GA functions and use united gtag.js, it's not difficult. |
This comment has been minimized.
This comment has been minimized.
@1v9 In fact, the purpose of this PR is to have a basic analytics data without having to include bloated(IMO) |
@maple3142 OK I know, you mean a slimmer version to do less work |
Would you add docs for this feature? |
Wait, I have some work to do, I won't change the existing implementation, and I will push updates and documentation as soon as I'm done. |
- Add Google Analytics Pageview (theme-next#1198) - Make font-size customized only when `theme.font.enable` is true (theme-next#1058) - Point to different website based on the scheme (theme-next#1202) - New Valine options (theme-next#1193) - Improve the style of site-nav (theme-next#1180) - Code style update (theme-next#1197, theme-next#1205) - Replace id with class name (theme-next#1209) - Add lang attribute to article tag when specified in front matter (theme-next#1199) - Fix compatibility issues with hexo-util@1.3.0 (theme-next#1175) - Optimize the loading of three.js (theme-next#1140) - New README for NexT (theme-next#1155) *** For full changes, see the [comparison between v7.4.1 and v7.5.0](theme-next/hexo-theme-next@v7.4.1...v7.5.0)
How to use?
In NexT
_config.yml
: