New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aqzhyi/google-analytics

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aqzhyi/google-analytics - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

5

package.json
{
"license": "MIT",
"version": "0.3.1",
"version": "0.3.2",
"name": "@aqzhyi/google-analytics",

@@ -26,4 +26,3 @@ "description": "Google Analytics (GA4) library",

"type": "git",
"url": "https://github.com/Aqzhyi/oh-my-monorepo",
"directory": "@aqzhyi/google-analytics"
"url": "https://github.com/Aqzhyi/oh-my-monorepo/tree/main/%40aqzhyi/google-analytics"
},

@@ -30,0 +29,0 @@ "keywords": [

60

README.md

@@ -11,41 +11,43 @@ # @aqzhyi/google-analytics

## `<GoogleAnalytics />` (astro-component)
## Usage (Astro)
> Insert the GTM (Google Tag Manager) script into the Astro Layout and configure your Google Analytics ID, for example: `'G-G90JYXXXXX'`.
### `<GoogleAnalytics />`
###### pages/_layout/BasicLayout.astro
> Insert the Google Tag Manager (GTM) script into the HTML using the Google Analytics ID you have configured (e.g., `'G-G90JYXXXXX'`).
```astro
---
import { GoogleAnalytics } from "@aqzhyi/google-analytics"
---
1. `pages/_layout/BasicLayout.astro`
<!doctype html>
<html>
<head>
<GoogleAnalytics id='G-G90JYXXXXX' />
</head>
<body>
<slot />
</body>
</html>
```
```astro
---
import { GoogleAnalytics } from '@aqzhyi/google-analytics'
---
###### pages/index.astro
<!doctype html>
<html>
<head>
<GoogleAnalytics id='G-G90JYXXXXX' />
</head>
<body>
<slot />
</body>
</html>
```
```
---
import BasicLayout from "./_layout/BasicLayout.astro"
---
1. `pages/index.astro`
<BasicLayout>
Page 1
</BasicLayout>
```
```
---
import BasicLayout from "./_layout/BasicLayout.astro"
---
###### Preview
<BasicLayout>
Page 1
</BasicLayout>
```
> Preview
![](https://raw.githubusercontent.com/Aqzhyi/mono/refs/heads/main/%40aqzhyi/google-analytics/public/works.png)
## `<GoogleAnalytics debug />` (astro-component)
### `<GoogleAnalytics debug />`

@@ -59,2 +61,4 @@ ```astro

> Preview
![](https://raw.githubusercontent.com/Aqzhyi/mono/refs/heads/main/%40aqzhyi/google-analytics/public/debug-if-no-input.png)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc