包详细信息

promoted-snowplow-logger

promotedai2.8kMIT8.2.3

Logging utility for browser-side Typescript that logs Promoted events to our Metrics Snowplow-compatible API

library, promoted, logger, logging

自述文件

promoted-snowplow-logger

This event logger (tracker) library is used to simplify browser-side logging. It relies on the browser-side JS having the Snowplow tracker library installed. This library uses the Promoted Metrics Snowplow-compatible API. See the web integration guide to learn how to use this library.

Features

Uses

Scripts

  • Run most commands: npm run finish
  • Build the project: npm run build
    • Validate output bundle size with npm run size
  • Lint the project: npm run lint
  • Run unit tests: npm test or npm test

When developing locally

If you want to test local changes in an actual deployment, use npm link.

  1. Run npm run updateLink.
  2. Go to client directory and run npm link promoted-snowplow-logger.

When you update promoted-snowplow-logger, run npm run updateLink.

When you want to undo, use npm unlink in promoted-snowplow-logger/dist and npm unlink promoted-snowplow-logger in the client directory.

Deploy

We use a GitHub action that runs semantic-release to determine how to update versions. Just do a normal code review and this should work. Depending on the message prefixes (e.g. feat:, fix:, clean:, docs:), it'll update the version appropriately.

Resources

The base of this repository is a combination of the following repos:

更新日志

8.2.2 (2024-10-07)

Bug Fixes

8.2.1 (2024-06-29)

Bug Fixes

  • an attempt to fix semantic release GHA (#50) (619518e)

8.2.0 (2024-06-29)

Bug Fixes

Features

8.1.2 (2024-06-28)

Bug Fixes

8.1.1 (2024-06-28)

Bug Fixes

8.1.0 (2024-06-28)

Features

8.0.0 (2024-04-02)

Code Refactoring

BREAKING CHANGES

  • this removes a previously required field.

After removing the validation, the platform subdomain is not needed anymore.

TESTING=ran unit tests

7.2.0 (2023-12-15)

Features

  • adds capability for multiple snowplow trackers on a page (#25) (83031f9)

7.1.0 (2023-11-07)

Features

7.0.0 (2023-09-08)

Features

BREAKING CHANGES

  • removes the logUserId field

TESTING=unit tests

6.1.1 (2023-02-24)

Bug Fixes

6.1.0 (2022-08-10)

Features

6.0.0 (2022-07-13)

Features

  • support shopping cart on actions (#18) (f505bd9)

BREAKING CHANGES

  • adds ErrorHandler again to the constructor for use in validation code.

TESTING=unit tests

  • fix: test

5.0.0 (2022-06-27)

Features

BREAKING CHANGES

  • Large changes to the interface. Requires Snowplow Tracker v3.

Also includes some smaller clean-ups:

  • Removes React.
  • Removes logUser and fields that needed.

TESTING=Unit tests. Manual test.

  • remove the explicit snowplow dep

It's not needed since we ask for the methods to be passed in.

  • small tsconfig update

4.2.0 (2022-06-15)

Features

4.1.0 (2022-06-15)

Features

4.0.0 (2022-06-15)

Code Refactoring

  • improve types, remove unused types; split (#12) (0c41968)

BREAKING CHANGES

  • Adds better types for inputs. Removed unused Request and Insertion types. If we want to add something like this back, we should add a DeliveryLog.

This PR also refactors index.ts into separate files.

TESTING=unit tests

  • fix: make action.userinfo optional

  • fix: the types in the test data

  • add type to createEventLogger

3.1.0 (2021-07-22)

Features

3.0.0 (2021-06-10)

  • Another commit to force a breaking change. (ccf103a)

BREAKING CHANGES

  • this syntax is very nitpicky

TESTING=none

2.2.0 (2021-06-10)

Features

  • rename handleLogError to handleError (50c1274)

2.1.0 (2021-05-28)

Features

  • support async loading of snowplow script (19e60d9)

2.0.0 (2021-03-27)

Bug Fixes

  • small tsx issue in previous commit (b91cd0e)
  • try to fix github actions failure (442a4d0)

Features

BREAKING CHANGES

  • These protos change the interface. The old libraries do not work.

TESTING=unit tests

1.0.0 (2021-02-28)