Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Incorporate Google Analytics #251

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ShaunR1991
Copy link

@ShaunR1991 ShaunR1991 commented Nov 16, 2024

Description

This pull request incorporates Google Analytics into the SplashKit website to enable website traffic tracking and analytics. The implementation uses the head field in astro.config.mjs to inject the required <script> tags into the site's <head> section. This change ensures analytics functionality is seamlessly integrated.

Motivation

Tracking user interactions on the website will help the team make informed decisions to improve the user experience, prioritize features, and gauge the effectiveness of content.

Dependencies

No additional dependencies are required for this change.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Testing of functionality can only be done once incorporated, however if the tag is not communicating back to Google Analytics, it will not break any existing functionality. Once merged, I will check that the analytics tag is correctly reporting data using the Google Tag Assistant.
I have also ensured the implementation does not interfere with existing website functionality.

The banner is displaying as expected:

image

The privacy preferences are detecting the analytics tag as expected:

image

Analytics data is the only data being collected. Console prints when consent is granted for analytics data to be collected:

image

Testing Checklist

  • Tested in latest Chrome
  • Tested in latest Firefox
  • npm run build
  • npm run preview

Checklist

If involving code

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code in hard-to-understand areas.
  • My changes generate no new warnings.

If modified config files

  • I have checked the following files for changes:
    • package.json (incorporated partytown)
    • astro.config.mjs
    • netlify.toml (no changes made)
    • docker-compose.yml (no changes made)
    • custom.css (no changes made)

Folders and Files Added/Modified

  • Modified:
    • astro.config.mjs
    • package.json
    • package-lock.json

Copy link

netlify bot commented Nov 16, 2024

Deploy Preview for splashkit-io ready!

Name Link
🔨 Latest commit 3e7c1d4
🔍 Latest deploy log https://app.netlify.com/sites/splashkit-io/deploys/675e486874bdbc0008e7b692
😎 Deploy Preview https://deploy-preview-251--splashkit-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@omckeon omckeon assigned omckeon and unassigned omckeon Feb 14, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants