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

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

Conversation

yihui
Copy link
Owner

@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
@kaizacorp
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?

@yihui
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 https://yihui.name).

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

@kaizacorp
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>.

@yihui yihui force-pushed the feature/google-analytics branch from 2dc22ab to d2762cf Compare August 14, 2017 20:28
@yihui yihui force-pushed the feature/google-analytics branch from d2762cf to cc26a54 Compare August 29, 2017 03:02
@yihui yihui force-pushed the feature/google-analytics branch from cc26a54 to fc887e9 Compare October 8, 2017 14:24
@yihui yihui force-pushed the feature/google-analytics branch from fc887e9 to da7fee9 Compare October 27, 2017 03:17
@yihui yihui force-pushed the feature/google-analytics branch from da7fee9 to b11ef1e Compare March 21, 2018 15:39
@yihui yihui force-pushed the feature/google-analytics branch from b11ef1e to e6c6829 Compare August 30, 2018 15:02
@yihui yihui force-pushed the feature/google-analytics branch from e6c6829 to a71065d Compare October 1, 2018 14:33
@yihui yihui force-pushed the feature/google-analytics branch from a71065d to e99dc0b Compare March 20, 2019 02:59
@yihui yihui force-pushed the feature/google-analytics branch from e99dc0b to 8f0cfa7 Compare April 18, 2019 19:01
@yihui yihui force-pushed the feature/google-analytics branch from 8f0cfa7 to 2bb06ed Compare March 17, 2020 03:07
@yihui yihui force-pushed the feature/google-analytics branch from 2bb06ed to d2f3bd9 Compare July 24, 2020 19:48
@yihui yihui force-pushed the feature/google-analytics branch 2 times, most recently from 5b0831d to 78301df Compare October 11, 2020 20:55
@yihui yihui force-pushed the feature/google-analytics branch from 83c8b97 to 4010d1c Compare June 15, 2022 03:50
@yihui yihui force-pushed the feature/google-analytics branch from 4010d1c to f8af380 Compare February 5, 2024 14:57
@yihui yihui force-pushed the feature/google-analytics branch from f8af380 to e92dabc Compare March 4, 2024 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants