@gastrofy/init-gtag
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

About

It is used to initialize the gtag.js. According to the official default installation, it is much easier to combine the gtag snippet code to any javascript modules.

Notice

  1. It will returns a push tag function instead of exposing the gtag function to the window.
  2. It is required to name the dataLayer.

How to use

import { initGtag } from "@gastrofy/init-gtag";

var pushTag = initGtag( PRODUCT_ID, DATA_LAYER_NAME, ADDITIONAL? );

/@gastrofy/init-gtag/

    Package Sidebar

    Install

    npm i @gastrofy/init-gtag

    Weekly Downloads

    2

    Version

    0.1.4

    License

    ISC

    Unpacked Size

    6.89 kB

    Total Files

    6

    Last publish

    Collaborators

    • zhiguang-gastrofy