Skip to content
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 enable Google Analytics #3

wants to merge 1 commit into
base: master
Choose a base branch


Copy link

@yihui yihui commented Jun 20, 2017

Add {{ template "_internal/google_analytics.html" . }} to foot_custom.html, and configure googleAnalytics in config.toml.

@yihui yihui force-pushed the feature/google-analytics branch 2 times, most recently from 22e4df5 to 2d8e1f1 Compare June 20, 2017 04:48
@yihui yihui added the feature label Jun 22, 2017
@yihui yihui force-pushed the feature/google-analytics branch 2 times, most recently from 39c6ec9 to b8597d4 Compare July 3, 2017 18:18
@yihui yihui force-pushed the feature/google-analytics branch 3 times, most recently from e735c5b to 2dc22ab Compare July 13, 2017 07:08
Copy link

I wasn't able to get Google Analytics to work until putting the code into head_custom.html. Perhaps this should be changed?

Copy link
Owner Author

yihui commented Aug 11, 2017

It does not have to be in <head>. I often put Google Analytics at the very end of <body> for performance reasons (take a look at my source HTML

As usual, if anything does not work, please show me an example.

Copy link

Okay thanks, I will try that out.

My apologies, I was using the Google Tag Assistant Chrome extension to check and it wasn't happy if it wasn't in <head>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants