
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@digi4care/astro-google-analytics
Advanced tools
A seamless integration for injecting Google Analytics snippets into Astro projects, supporting popular web analytics tools.
A seamless integration for injecting Google Analytics snippets into Astro projects, supporting popular web analytics tools.
To install the package, use npm or yarn:
npm install @digi4care/astro-google-analytics
or
yarn add @digi4care/astro-google-analytics
This package provides components for easily adding Google Analytics (GA4) and Site Verification snippets to your Astro project.
---
import { Analytics, AnalyticsNoScript, SiteVerification } from '@digi4care/astro-google-analytics';
---
<!doctype html>
<html lang="en" dir="ltr">
<head>
<SiteVerification id="GA_VERIFICATION_ID" />
<Analytics id="GA4_MEASUREMENT_ID" partytown={false} domain="https://www.some-custom-domain-is-also-supported.com" />
</head>
<body>
<AnalyticsNoScript id="GA4_MEASUREMENT_ID" domain="https://www.some-custom-domain-is-also-supported.com" />
<slot />
</body>
</html>
id
prop. If you need to support a custom domain, use the domain
prop.partytown
support for this component.id
prop. You can also specify the name
prop to use different site verification names for various vendors.Be aware that the AnalyticsNoScript
component does not support partytown
. Do not use it if you want to enable partytown
.
false
.https://www.googletagmanager.com
.https://www.googletagmanager.com
.google-site-verification
. This allows you to use different site verification names for various vendors.---
export interface Props {
name?: string;
id?: string;
}
const { id, name = "google-site-verification" } = Astro.props;
---
{id && <meta name={name} content={id} />}
This project is licensed under the MIT License.
FAQs
A seamless integration for injecting Google Analytics snippets into Astro projects, supporting popular web analytics tools.
We found that @digi4care/astro-google-analytics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.