Neutralize Pesky Miscreants

    @baloise/web-app-google-utils
    TypeScript icon, indicating that this package has built-in type declarations

    1.3.0 • Public • Published

    @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');

    Keywords

    none

    Install

    npm i @baloise/web-app-google-utils

    DownloadsWeekly Downloads

    9

    Version

    1.3.0

    License

    Apache-2.0

    Unpacked Size

    26.8 kB

    Total Files

    11

    Last publish

    Collaborators

    • assistentenitch
    • madalina.iacob
    • yannickholzenkamp
    • montakasparsone
    • team_mortal
    • mladenplaninicic
    • nobilo
    • thomasseyssenstpo
    • se-aperto-com
    • baopso
    • hirsch88