Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Updated scripts for correctly using gtag. #2962

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

Conversation

sr-dash
Copy link
Contributor

@sr-dash sr-dash commented Jan 17, 2025

Implementation of Google tag ID to correctly getting tracked requires further modification in addition to the one line script in the _includes/scripts.liquid file as

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

    gtag('config', '{{ site.google_analytics }}');
  </script>

I have made the changes and tested it out on my personal webpage to ensure the tracking in analytics dashboard.

Added Google Search Console ID creation and usage in the template for google-site-verification.
Added documentation for Google Search Console ID generation ad usage in the template with `google-site-verification` tag.
Copy link

netlify bot commented Jan 17, 2025

Deploy Preview for relaxed-lollipop-b6bc17 ready!

Name Link
🔨 Latest commit c9e27f2
🔍 Latest deploy log https://app.netlify.com/sites/relaxed-lollipop-b6bc17/deploys/67899efec4b6fa00084b44cc
😎 Deploy Preview https://deploy-preview-2962--relaxed-lollipop-b6bc17.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.

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.

1 participant