@r/google-tag-manager
A wrapper for google tag manager with a builtin jail.
Last updated 10 months ago by fruchtose .
UNLICENSED · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @r/google-tag-manager 
SYNC missed versions from official npm registry.

r/google-tag-manager

A wrapper for google tag manager with a builtin jail.

Change Log

v0.0.0

Initial release

v0.1.0

v0.2.0

  • Include additional location / referrer data in default payload.

v0.2.2

  • Update @r/frames dependency

v0.2.3

  • Queue events until to loaded event returns from jail.

v0.2.6

  • Release assets are packaged with the build, rather than compiled upon install

v0.2.7

  • Updates @r/frames so that this package will not break server environments

Installation

yarn add @r/google-tag-manager -s

Usage example

import * as gtm from '@r/google-tag-manager';

// initialize gtm
gtm.setup({
  containerId: 'GTM-XXXXXX',
  host: 'redditmedia.com',
  payload: {
    user: 1234,
    subreddit: 'WhatsSnoo',
  },
});

// trigger events (payload optional)
gtm.trigger('pageview', {
  subreddit: 'announcements',
});
gtm.trigger('loggedout');

TODO

  1. Add tests
  2. Convert to typescript

Current Tags

  • 0.2.7                                ...           latest (10 months ago)

15 Versions

  • 0.2.7                                ...           10 months ago
  • 0.2.6                                ...           10 months ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.5                                ...           3 years ago
  • 0.1.4                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.0                                ...           3 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 1
Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |