@bufferapp/buffer-tracking-node

0.0.285 • Public • Published

Buffer Tracker - Node (Javascript)

Strongly-typed analytics app for use in Node projects.

You will need to have configured segment as per these instructions before using this package.

You can install this by running:

npm i @bufferapp/buffer-tracking-node

Next you'll need to add the dependency to the desired file, alongside the existing segment configuration:

const typewriter = require('@bufferapp/buffer-tracking-node')
const Analytics = require('analytics-node')
const analytics = new Analytics('YOUR_WRITE_KEY')

You'll then need to provide our typewriter app with a reference to the segment analytics-node reference:

typewriter.setTypewriterOptions({
  analytics: analytics
})

And finally, you can use the typewriter reference to call the desired tracking functions:

typewriter.shopGridLinkRemoved({
  userId: userId,
  properties: {
    product: 'publish',
    channel: 'instagram',
    channelId: '12345679',
    channelServiceId: '987654567898',
    linkText: 'hiii',
    linkURL: 'www.buffer.com'
  }
})

When calling these functions, any violations or errors will be logged to your console.

Latest plan changes not reflected in the library

If the library does not reflect the latest tracking changes then you can trigger a rebuild manually. Head over to this URL and select the Run Workflow option. After a few minutes, the latest release should be pushed to NPM.

Screenshot 2021-06-01 at 14 25 51

Readme

Keywords

Package Sidebar

Install

npm i @bufferapp/buffer-tracking-node

Weekly Downloads

152

Version

0.0.285

License

ISC

Unpacked Size

2.15 MB

Total Files

10

Last publish

Collaborators

  • davidluhr
  • egomezd
  • jacobchadwell
  • philippemiguet
  • josemdev
  • msanroman
  • daisymarie128
  • hamstu
  • stevenc81
  • bufferbot
  • mayauribe
  • esclapes
  • ay8s
  • mickmahady
  • dinostheo
  • hitherejoe
  • dace
  • erickhun
  • kmbriseno
  • kiriappeee
  • cmunozgar
  • peteremilbuffer
  • arekpn
  • abeeb
  • buffermw