Skip to content

Add Google Analytics tracking to all pages#25

Merged
brunoborges merged 2 commits intomainfrom
copilot/add-google-analytics
Feb 17, 2026
Merged

Add Google Analytics tracking to all pages#25
brunoborges merged 2 commits intomainfrom
copilot/add-google-analytics

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 17, 2026

Adds Google Analytics (G-HL8F2RJW68) to all HTML pages by inserting the gtag.js snippet into both template sources.

Changes

  • templates/index.html: Added GA snippet before closing </head> tag
  • templates/slug-template.html: Added GA snippet before closing </head> tag

The generator produces 91 HTML files from these templates. Generated files are excluded via .gitignore and will be rebuilt on deployment.

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HL8F2RJW68"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-HL8F2RJW68');
</script>

Screenshot

Homepage with analytics enabled:

Screenshot

Original prompt

This section details on the original issue you should resolve

<issue_title>Add Google Analytics</issue_title>
<issue_description>Here is the code block for Google Analytics on all HTML pages:

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HL8F2RJW68"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-HL8F2RJW68');
</script>
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Google Analytics to all HTML pages Add Google Analytics tracking to all pages Feb 17, 2026
Copilot AI requested a review from brunoborges February 17, 2026 18:40
@brunoborges brunoborges marked this pull request as ready for review February 17, 2026 18:42
@brunoborges brunoborges merged commit f74d955 into main Feb 17, 2026
@brunoborges brunoborges deleted the copilot/add-google-analytics branch February 26, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Google Analytics

2 participants