1.4.0 • Published 6 months ago

@baloise/web-app-google-utils v1.4.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

@baloise/web-app-google-utils

Utilities for managing Google plugins (Maps & Tag Manager) in Baloise web applications.

Continous Release

npm npm bundle size npm GitHub GitHub issues

Installation guide

Using npm

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:

// 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:

// Initialize once
const gtm = new BalGoogleTagManager();
gtm.load({
  applicationName: 'your-app-name',
  apiKey: 'your-api-key'
});

// Send an event
gtm.sendClickEvent('your-event');
1.4.0

6 months ago

1.3.0

2 years ago

1.2.0

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.2

3 years ago

1.0.1

3 years ago