react-google-analytics-lfc
v1.0.3
Published
A package for loading Google analytics
Maintainers
Readme
React Google Analytics LFC
A lightweight package for loading Google Analytics script from a predefined GitHub repository.
Installation
npm install react-google-analytics-lfcUsage
import { useAnalytics } from 'react-google-analytics-lfc';
// Create an analytics instance
const analytics = useAnalytics();
// Load the script
await analytics.loadScript();Features
- Loads Google Analytics script from a predefined GitHub repository
- Simple and lightweight implementation
- TypeScript support
Notes
- The script will be loaded and executed in the current document
- The script is loaded from: https://github.com/graf-andreev/google-analytics/blob/main/script.js
License
MIT
