Socket
Book a DemoInstallSign in
Socket

analytics-gtag

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analytics-gtag

Google Analytics gtag definition

1.0.2
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

analytics-gtag

update

  • 2019/06/24 1.0.2 Initial version

How to use

Contains the following specifications.

https://developers.google.com/analytics/devguides/collection/gtagjs/pages https://developers.google.com/analytics/devguides/collection/gtagjs/events https://developers.google.com/analytics/devguides/collection/gtagjs/screens https://developers.google.com/analytics/devguides/collection/gtagjs/user-timings https://developers.google.com/analytics/devguides/collection/gtagjs/exceptions https://developers.google.com/gtagjs/reference/api https://developers.google.com/gtagjs/reference/event https://developers.google.com/gtagjs/reference/parameter

gtag("config", "GA_MEASUREMENT_ID", {
  page_title: "homepage",
  page_path: "/home"
});
gtag("config", "GA_MEASUREMENT_ID_1");
gtag("config", "GA_MEASUREMENT_ID_2");

gtag("event", "xyz");

gtag("event", "aaa", {
  event_category: "bbb",
  event_label: "ccc"
});

gtag("event", "login", { method: "Google" });

gtag("event", "video_auto_play_start", {
  event_label: "My promotional video",
  event_category: "video_auto_play",
  non_interaction: true
});

gtag("event", "screen_view", {
  app_name: "myAppName",
  screen_name: "Home"
});
gtag('config', 'GA_MEASUREMENT_ID', { 'app_name': 'myAppName' });
gtag('event', 'screen_view', { 'screen_name': 'Home'});


gtag('event', 'timing_complete', {
  'name' : 'load',
  'value' : 3549,
  'event_category' : 'JS Dependencies'
});
gtag('event', 'exception', {
  'description': 'error_description',
  'fatal': false
});

license

Keywords

Google

FAQs

Package last updated on 24 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.