1.5.5 • Published 1 year ago

swdc-tracker v1.5.5

Weekly downloads
215
License
SEE LICENSE IN LI...
Repository
-
Last release
1 year ago

swdc-tracker

npm version main

Sends data to snowplow. Use this to track events in plugins written in js.

Install

yarn add swdc-tracker

Usage

extension.ts

import swdcTracker from 'swdc-tracker'

// initialize it once with the backend api host, namespace and appId
swdcTracker.initialize("https://api.software.com", "codetime-events", "codetime-vscode")

./Utils.ts

import swdcTracker from 'swdc-tracker'

export function openSomeFile() {
  swdcTracker.trackEditorAction({
    jwt: jwt,
    entity: "editor",
    type: "activate",
    tz_offset_minutes: 420,
    file_name: "your_file.js",
    file_path: "/path/to/your_file.js",
    file_syntax: "javascript",
    file_line_count: 10,
    file_character_count: 100,
    project_name: "your_project_name",
    project_directory: "/path/to/your/project",
    plugin_id: 1,
    plugin_version: "1.2.3"
  })
  ...
}

Test mode

swdc-tracker has test mode on by default. In order to send events to snowplow, set env ENABLE_SWDC_TRACKER to "true"

test mode will log the event's properties and contexts so you can easily debug payloads being sent to snowplow.

Development

Install Deps

yarn

Build

yarn build
1.5.5

1 year ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

3 years ago

1.4.9

3 years ago

1.4.8

3 years ago

1.4.6

3 years ago

1.4.7

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.0.23

4 years ago

1.2.0

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.1.0

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago