svelte-google-analytics
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

svelte-google-analytics

Description: A Svelte component to easily integrate Google Analytics tracking into your Svelte applications.

Installation

You can install this package via npm:

npm install svelte-google-analytics

Usage

To use the GoogleAnalytics component, import it into your Svelte file:

<script lang="ts">
  import { GoogleAnalytics } from "svelte-google-analytics";
</script>

<GoogleAnalytics trackingId='YOUR_TRACKING_ID_HERE' />
<slot />

Attributes

trackingId

  • Type: String
  • Default: "YOUR_TRACKING_ID_HERE"
  • Description: Google Analytics tracking ID. Replace 'YOUR_TRACKING_ID_HERE' with your own tracking ID.

Contributing

Contributions are welcome! Please follow the guidelines in CONTRIBUTING.md before submitting pull requests.

License

This package is licensed under the MIT License. See LICENSE for more details.

Issues

If you encounter any issues with this package, please report them here.

Package Sidebar

Install

npm i svelte-google-analytics

Weekly Downloads

2

Version

2.0.3

License

MIT

Unpacked Size

5.27 kB

Total Files

7

Last publish

Collaborators

  • dhimankamal