ioos / notebooks_demos

Notebook demonstrations and examples
https://ioos.github.io/notebooks_demos/
MIT License
19 stars 19 forks source link

Update _config.yml #402

Closed MathewBiddle closed 3 years ago

MathewBiddle commented 3 years ago

adding google analytics measurement ID

closes https://github.com/ioos/notebooks_demos/issues/190

MathewBiddle commented 3 years ago

@ocefpaf and @mwengren, I've poked around and think this is all we need to do to get tracking setup. If that is not correct, please point me to the appropriate documentation and I can make whatever other changes are necessary.

MathewBiddle commented 3 years ago

@mwengren good call. I'll spin it up locally and see what I find.

MathewBiddle commented 3 years ago

@mwengren No clue if this is right but after deploying locally I see this javascript piece with that identifier in it: image

FWIW, I've documented what I did to run the website locally in this wiki page.

mwengren commented 3 years ago

Looks promising. I'm not sure how GA works exactly - I doubt you'll be able to see any metrics on the dashboard because it's running on your localhost in dev mode. You'll probably have to deploy to the ioos.github.io URL to know if it actually works or not.

MathewBiddle commented 3 years ago

@ocefpaf I'll let you take a look and see if I broke anything before we merge.

ocefpaf commented 3 years ago

That should do it. Let's merge it!

MathewBiddle commented 3 years ago

I'm poking around the GA overview and not seeing any data sent in. In another tab in browsing the site https://ioos.github.io/notebooks_demos/ to see if my browsing appears in the analytics, still no dice. image

MathewBiddle commented 3 years ago

I wonder if the provider in _config.yml should be google-universal?

https://github.com/ioos/notebooks_demos/blob/11c14764cb43441e63aa55d52fb1f1aa0c6e717c/webpage/_config.yml#L88

ocefpaf commented 3 years ago

Google Analytics changed so much since the last time I used it that I have no idea. I'm OK to just tests things out. However, I do remember that it took a few weeks for the first streams of data to appear. Did you check it again recently? Do we have any data?