https://github.com/baloise/web-app-google-utils
Utilities for managing google plugins for Baloise Web Applications
https://github.com/baloise/web-app-google-utils
Last synced: 10 months ago
JSON representation
Utilities for managing google plugins for Baloise Web Applications
- Host: GitHub
- URL: https://github.com/baloise/web-app-google-utils
- Owner: baloise
- License: apache-2.0
- Created: 2021-06-02T13:44:27.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-07-02T06:04:07.000Z (12 months ago)
- Last Synced: 2025-08-09T07:34:31.646Z (11 months ago)
- Language: TypeScript
- Size: 227 KB
- Stars: 0
- Watchers: 11
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @baloise/web-app-google-utils
Utilities for managing Google plugins (Maps & Tag Manager) in Baloise web applications.
[](https://github.com/baloise/web-app-google-utils/actions/workflows/continous.yml)
[](https://github.com/baloise/web-app-google-utils/actions/workflows/release.yml)





## Installation guide
### Using npm
```bash
npm i @baloise/web-app-google-utils
```
## Components
### Google Maps
Class `BalGoogleMaps` to load the Google Maps script into your application.
#### What you need:
- Version of Google Maps that you want to load
- API Key for Google Maps
#### How you use it:
```typescript
// Initialize once
BalGoogleMaps.load({version: 'your-version', apiKey: 'your-api-key'});
```
### Google Tag Manager
Class `BalGoogleTagManager` to load the GTM script and handle the events. At the moment only click is supported.
#### What you need:
- API Key for Google Tag Manager
- Name of your application
#### How you use it:
```typescript
// Initialize once
const gtm = new BalGoogleTagManager();
gtm.load({
applicationName: 'your-app-name',
apiKey: 'your-api-key'
});
// Send an event
gtm.sendClickEvent('your-event');
```