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

docs: Special Google Analytics partial file seems redundant #2425

Closed
MarkDBlackwell opened this issue Sep 9, 2016 · 2 comments
Closed

docs: Special Google Analytics partial file seems redundant #2425

MarkDBlackwell opened this issue Sep 9, 2016 · 2 comments

Comments

@MarkDBlackwell
Copy link
Contributor

MarkDBlackwell commented Sep 9, 2016

Since Hugo contains an internal template for Google Analytics (added in October, 2015), the existence (in the Hugo docs) of a special partial file for Google Analytics (added in May, 2014) seems redundant—or, basically so. It almost exactly duplicates Hugo's internal template, with two differences:

  1. The Google Analytics tracking code is hard-coded; and
  2. The third argument (to script ga in the template) is spf13.com.

The tracking code could be moved to the Hugo docs' config file by adding to it the usual googleAnalytics variable.

The third argument has remained unchanged from its original value of spf13.com set in November, 2013, despite the fact that in September, 2014 the Hugo docs moved (from http://hugo.spf13.com to http://gohugo.io). BTW, a search confirmed that Google Analytics generally works on Github Pages.

If the third argument is best kept as it is (or changed to auto), then its configurability (in a new variable in config.toml if different from baseurl), since useful to the Hugo docs, presumably also would be useful to some of Hugo's users on their own sites.

If the third argument is best changed to gohugo.io then, for the Hugo docs, the present default value as calculated in Hugo's internal Google analytics partial (i.e., the value of baseurl) would work.

Then, seemingly, either way would enable Hugo to:

  1. Drop the Hugo docs file layouts/partials/analytics.html; and
  2. Provide the Hugo docs themselves as an example of how to use the internal Google analytics template.

Just to confirm, should the third argument indeed be spf13.com? or should it change to gohugo.io?

If a new, "ga third argument" configuration variable is desirable, what should its name be?

@digitalcraftsman
Copy link
Member

This issue becomes irrelevant with @rdwatters revision of the docs.

@bep bep closed this as completed Mar 24, 2017
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants