@gastrofy/init-gtag
v0.1.4
Published
init gtag
Readme
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
- It will returns a push tag function instead of exposing the gtag function to the window.
- 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? );