Riverscapes / riverscapes-jekyll-theme

Gem-based GHPages theme that all docs will consume from
https://riverscapes.github.io/riverscapes-jekyll-theme/
MIT License
0 stars 2 forks source link

Should we update theme for Google Analytics? #19

Closed joewheaton closed 4 years ago

joewheaton commented 4 years ago

Hi @MattReimer I want to get Google Analytics going on all of our sites, but want (I think) each site to have its own Analytics ID. So a series of questions...

Q1 - Is what I'm doing here kosher?

I tested on the LTPBR site and on the Capstone class (shown below in video) adding Google Analytics in. I followed these instructions. Here are my code changes:

Q2 - Make a Tutorial?

Can we add these instructions and above video to Tool Documentation?

Q3 - Should we add anything to template site?

Should we just update this repository with the template website so that _config.yml file has spot for Google Analytics code and header.html has <head> code in it, and analytics.html is in includes folder?

philipbaileynar commented 4 years ago

I was also looking at analytics recently. I want to put an id on the buttons where users download our software, but requires some JavaScript in the head and body tags. Ie requires theme changes. Let's discuss.

MattReimer commented 4 years ago

OK, so let's start off with the simple stuff.

Joe, roll back all those changes. Google analytics was built into our themes from the start. In your config.yml file there's a line called google_analytics: UA-XXXXXXXXXXX-X

Just uncomment that and fill in the UA code and you're good. No Javascript needed.

For Philip's request to log specific actions we will need some javascript but it should be simple and minimal. I can maybe draw up an example of what that looks like and put it in the template theme so you can see how that goes.

MattReimer commented 4 years ago

Looks like this is fixed so I'll close it.