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
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 Jun 20, 2017
@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 Jun 30, 2017
@yihui yihui force-pushed the feature/google-analytics branch 3 times, most recently from e735c5b to 2dc22ab Jul 9, 2017
@kaizacorp
Copy link

@kaizacorp kaizacorp commented Aug 11, 2017

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 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

@kaizacorp kaizacorp commented Aug 11, 2017

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 Aug 14, 2017
@yihui yihui force-pushed the feature/google-analytics branch from d2762cf to cc26a54 Aug 29, 2017
@yihui yihui force-pushed the feature/google-analytics branch from cc26a54 to fc887e9 Oct 8, 2017
@yihui yihui force-pushed the feature/google-analytics branch from fc887e9 to da7fee9 Oct 27, 2017
@yihui yihui force-pushed the feature/google-analytics branch from da7fee9 to b11ef1e Mar 21, 2018
@yihui yihui force-pushed the feature/google-analytics branch from b11ef1e to e6c6829 Aug 30, 2018
@yihui yihui force-pushed the feature/google-analytics branch from e6c6829 to a71065d Oct 1, 2018
@yihui yihui force-pushed the feature/google-analytics branch from a71065d to e99dc0b Mar 20, 2019
@yihui yihui force-pushed the feature/google-analytics branch from e99dc0b to 8f0cfa7 Apr 18, 2019
@yihui yihui force-pushed the feature/google-analytics branch from 8f0cfa7 to 2bb06ed Mar 17, 2020
@yihui yihui force-pushed the feature/google-analytics branch from 2bb06ed to d2f3bd9 Jul 24, 2020
@yihui yihui force-pushed the feature/google-analytics branch from d2f3bd9 to 5b0831d Oct 5, 2020
@yihui yihui force-pushed the feature/google-analytics branch from 5b0831d to 78301df Oct 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants