@builder.io/forum-tracking

0.0.9 • Public • Published

Builder.io Forum Tracking

This is an extremely simple NPM package that is meant primarily to be used with Unpkg's CDN to add quick tracking to our forum pages.

Building

First we need to create a keys.json file with this shape:

{
  "MIXPANEL_PUBLIC_KEY": "some-random-api-key-here-for-mixpanel",
  "AMPLITUDE_PUBLIC_KEY": "some-random-api-key-here-for-amplitude",
  "SOMESERVICE_PUBLIC_KEY" "you-get-the-idea"
}

(Right now only MIXPANEL_PUBLIC_KEY and AMPLITUDE_PUBLIC_KEY are required).

Then run:

$ npm install
$ npm run build

Publishing

Once you are properly authenticated with the npm CLI tool, increment the version field in package.json and then just run:

$ npm publish

The version number has to change every time we publish; NPM won't let us overwrite existing versions.

Then, go to the forum's theme settings, edit its HTML/CSS, and add/replace this in the </body> section:

<script src="//unpkg.com/@builder.io/forum-tracking@<VERSION>/dist/index.browser.js" async defer></script>

where <VERSION> is the version number in package.json.

Readme

Keywords

none

Package Sidebar

Install

npm i @builder.io/forum-tracking

Weekly Downloads

341

Version

0.0.9

License

ISC

Unpacked Size

370 kB

Total Files

4

Last publish

Collaborators

  • harmeet.builder
  • armela
  • strd6
  • murtaza-haveliwala
  • gustavohgs
  • sanyamkamat
  • shyam-builder
  • manucorporat
  • steve8708
  • samijaber
  • caleb.amsden
  • teleaziz123
  • mrkoreye
  • mhevery
  • adamdbradley