Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into repo-sync/OTTR_Templa…
Browse files Browse the repository at this point in the history
…te_Website/default
  • Loading branch information
cansavvy committed Feb 27, 2024
2 parents ca8fdc2 + 8d387e1 commit 5785b10
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion customize-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ <h3>Changing the favicon</h3>
<p>Here you can see that by default the Data Science Lab (dasl) favicon will be used.</p>
<pre><code>---
title: &quot;Course Name &quot;
date: &quot;August, 2023&quot;
date: &quot;February, 2024&quot;
site: bookdown::bookdown_site
documentclass: book
bibliography: [book.bib, packages.bib]
Expand Down
2 changes: 1 addition & 1 deletion more_features.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ Check to make sure that the terms work for you
![](resources/images/GA_Script_ID.png)

1. Add a line to the _output.yml file above the line that starts with `before body:` (i.e. nested under `includes`). This line should be `in_header: GA_Script.html`. Make sure this line is indented to the same level as the `before body:` line.
![](resources/images/output_file_with_GA.png)
![](resources/images/output_GA.png)

1. **Rerender** your course by making a change to one of your chapter RMD files in a pull request and pushing and merging the pull request. This will cause new html files to be made for each chapter in the `docs` folder. The Google Analytics code should now be in each of the html files - you can check by searching for `Google Analytics`.

Expand Down
2 changes: 1 addition & 1 deletion more_features.html
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ <h2>Google Analytics</h2>
<li><p>Add a <strong>stream</strong> to your property, choose the <strong>Web</strong> option. <img src="resources/images/GA_web.png" alt="Google Analytics stream options" /></p></li>
<li><p>Fill in your stream information with the <strong>link</strong> for your course (note you may need to remove https as this is part of a pull down menu to the left of where you paste your link) <img src="resources/images/GA_stream_link.png" alt="Google Analytics stream" /> <img src="resources/images/GA_stream_link_correct.png" alt="Google Analytics stream" /></p></li>
<li><p>On the resulting page you will see a <strong>Measurement ID</strong>. Copy this ID and paste it in the GA_Script.html file in the template replacing the fields that say {MeasurementID} including the curly brackets. For example, if your ID was <code>G-ABC123</code>, then the line <code>gtag('config', '{MeasurementID}');</code> would become <code>gtag('config', 'G-ABC123');</code>. <img src="resources/images/GA_ID.png" /> <img src="resources/images/GA_Script_ID.png" /></p></li>
<li><p>Add a line to the _output.yml file above the line that starts with <code>before body:</code> (i.e. nested under <code>includes</code>). This line should be <code>in_header: GA_Script.html</code>. Make sure this line is indented to the same level as the <code>before body:</code> line. <img src="resources/images/output_file_with_GA.png" /></p></li>
<li><p>Add a line to the _output.yml file above the line that starts with <code>before body:</code> (i.e. nested under <code>includes</code>). This line should be <code>in_header: GA_Script.html</code>. Make sure this line is indented to the same level as the <code>before body:</code> line. <img src="resources/images/output_GA.png" /></p></li>
<li><p><strong>Rerender</strong> your course by making a change to one of your chapter RMD files in a pull request and pushing and merging the pull request. This will cause new html files to be made for each chapter in the <code>docs</code> folder. The Google Analytics code should now be in each of the html files - you can check by searching for <code>Google Analytics</code>.</p></li>
<li><p>Go back to <a href="https://analytics.google.com/analytics">Google Analytics</a> and log in if you need to.</p></li>
<li><p>Check on the <strong>Reports</strong> button on the top of the far left icon menu. The icon looks like a bar chart. If you open up a browser window to your hosted course online, then you should see yourself as 1 user in the last 30 minutes. <img src="resources/images/GA_reports.png" alt="Google Analytics Reports" /> <img src="resources/images/GA_check.png" alt="Check Google Analytics" /></p></li>
Expand Down
File renamed without changes.
Binary file added resources/images/output_GA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5785b10

Please sign in to comment.