npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xylabs/pixel

v5.0.65

Published

Event Client for xylabs ESB

Downloads

1,912

Readme

@xylabs/pixel

logo

main-build npm-badge npm-downloads-badge jsdelivr-badge npm-license-badge codacy-badge codeclimate-badge snyk-badge socket-badge

Event Client for xylabs ESB

Reference

@xylabs/pixel


Classes

Interfaces

Type Aliases

classes

PixelApi

@xylabs/pixel


Constructors

Constructor

new PixelApi(baseUri): PixelApi;

Parameters

baseUri

string = 'prod'

Returns

PixelApi

Methods

trackEvents()

trackEvents(events): Promise<any>;

Parameters

events

UserEvent[]

Returns

Promise<any>

Referrer

@xylabs/pixel


Constructors

Constructor

new Referrer(): Referrer;

Returns

Referrer

Properties

local

local: string;

session

session: string;

Methods

toJson()

toJson(): 
  | undefined
  | {
  local: string;
  session: string;
};

Returns

| undefined | { local: string; session: string; }

UniqueUserId

@xylabs/pixel


Constructors

Constructor

new UniqueUserId(): UniqueUserId;

Returns

UniqueUserId

Properties

id

id: string;

Methods

toString()

toString(): string;

Returns

string

UserEventHandler

@xylabs/pixel


Extended by

Type Parameters

TData

TData extends EmptyObject

Constructors

Constructor

new UserEventHandler<TData>(): UserEventHandler<TData>;

Returns

UserEventHandler<TData>

Methods

funnelStarted()

abstract funnelStarted<T>(fields): Promisable<void>;

Type Parameters

T

T extends object

Parameters

fields

FunnelStartedFields | T

Returns

Promisable<void>


testStarted()

abstract testStarted<T>(fields): Promisable<void>;

Type Parameters

T

T extends object

Parameters

fields

TestStartedFields | T

Returns

Promisable<void>


userClick()

abstract userClick<T>(fields): Promisable<void>;

Type Parameters

T

T extends object

Parameters

fields

UserClickFields | T

Returns

Promisable<void>


viewContent()

abstract viewContent<T>(fields): Promisable<void>;

Type Parameters

T

T extends object

Parameters

fields

T | ViewContentFields

Returns

Promisable<void>

UtmFields

@xylabs/pixel


Constructors

Constructor

new UtmFields(): UtmFields;

Returns

UtmFields

Properties

fields

fields: Record<string, string>[] = [];

Methods

getUtmRecord()

getUtmRecord(): null | Record<string, string>;

Returns

null | Record<string, string>


toString()

toString(): string;

Returns

string


update()

update(): Record<string, string>[];

Returns

Record<string, string>[]

XyPixel

@xylabs/pixel


Properties

api

static api: PixelApi;

cid

cid: string;

email?

optional email: string;

email_hash?

optional email_hash: null | string;

exids?

optional exids: ExIds;

pixelId?

optional pixelId: string;

queue

queue: UserEvent[] = [];

Accessors

instance

Get Signature

get static instance(): XyPixel;

Returns

XyPixel

Methods

init()

static init(pixelId): XyPixel;

Parameters

pixelId

string

Returns

XyPixel


selectApi()

static selectApi(api): void;

Parameters

api

PixelApi

Returns

void


identify()

identify(email?): void;

Parameters

email?

string

Returns

void


send()

send<T>(
   event, 
   fields?, 
eventId?): Promise<void>;

Type Parameters

T

T extends JsonObject

Parameters

event

string

fields?

T

eventId?

string

Returns

Promise<void>

XyUserEventHandler

@xylabs/pixel


Extends

Type Parameters

T

T extends EmptyObject = EmptyObject

Constructors

Constructor

new XyUserEventHandler<T>(): XyUserEventHandler<T>;

Returns

XyUserEventHandler<T>

Overrides

UserEventHandler.constructor

Methods

funnelStarted()

funnelStarted(fields): Promise<void>;

Parameters

fields

FunnelStartedFields | T

Returns

Promise<void>

Overrides

UserEventHandler.funnelStarted


purchase()

purchase(fields): Promise<void>;

Parameters

fields

PurchaseFields | T

Returns

Promise<void>


testStarted()

testStarted(fields): Promise<void>;

Parameters

fields

TestStartedFields | T

Returns

Promise<void>

Overrides

UserEventHandler.testStarted


userClick()

userClick(fields): Promise<void>;

Parameters

fields

UserClickFields | T

Returns

Promise<void>

Overrides

UserEventHandler.userClick


viewContent()

viewContent(fields): Promise<void>;

Parameters

fields

ViewContentFields | T

Returns

Promise<void>

Overrides

UserEventHandler.viewContent

interfaces

CommonFields

@xylabs/pixel


Extended by

Properties

funnel?

optional funnel: string;

testData?

optional testData: string;

FunnelStartedFields

@xylabs/pixel


Extends

Properties

funnel?

optional funnel: string;

Inherited from

CommonFields.funnel


testData?

optional testData: string;

Inherited from

CommonFields.testData


name

name: string;

PurchaseFields

@xylabs/pixel


Extends

Properties

funnel?

optional funnel: string;

Inherited from

CommonFields.funnel


testData?

optional testData: string;

Inherited from

CommonFields.testData


id

id: string;

name?

optional name: string;

price?

optional price: number;

value?

optional value: number;

TestStartedFields

@xylabs/pixel


Extends

Properties

funnel?

optional funnel: string;

Inherited from

CommonFields.funnel


testData?

optional testData: string;

Inherited from

CommonFields.testData


name

name: string;

UserClickFields

@xylabs/pixel


Extends

Properties

funnel?

optional funnel: string;

Inherited from

CommonFields.funnel


testData?

optional testData: string;

Inherited from

CommonFields.testData


elementName

elementName: string;

elementType

elementType: string;

intent?

optional intent: string;

placement?

optional placement: string;

UserEvent

@xylabs/pixel


Properties

cid

cid: string;

create_time?

optional create_time: number;

email?

optional email: string;

email_hash?

optional email_hash: string;

event?

optional event: string;

event_id?

optional event_id: string;

exids?

optional exids: ExIds;

fields?

optional fields: Record<string, unknown>;

host?

optional host: string;

pathname?

optional pathname: string;

pixel?

optional pixel: string;

receive_time?

optional receive_time: number;

referrer?

optional referrer: object;

local

local: string;

session

session: string;

rid?

optional rid: string;

system?

optional system: ParsedResult;

uid?

optional uid: string;

utm?

optional utm: Record<string, string>[] | Record<string, string[]>;

ViewContentFields

@xylabs/pixel


Extends

Properties

funnel?

optional funnel: string;

Inherited from

CommonFields.funnel


testData?

optional testData: string;

Inherited from

CommonFields.testData


name

name: string;

path

path: string;

XyLabsTrackingEventJson

@xylabs/pixel


Properties

cid

cid: string;

create_time?

optional create_time: number;

email?

optional email: string;

email_hash?

optional email_hash: string;

event?

optional event: string;

event_id?

optional event_id: string;

exids?

optional exids: Record<string, string>;

fields?

optional fields: Record<string, unknown>;

host?

optional host: string;

ip?

optional ip: string;

pathname?

optional pathname: string;

pixel?

optional pixel: string;

receive_time?

optional receive_time: number;

rid?

optional rid: string;

system?

optional system: unknown;

ua?

optional ua: string;

uid?

optional uid: string;

utm?

optional utm: Record<string, string>[] | Record<string, string[]>;

type-aliases

UserEventSystem

@xylabs/pixel


type UserEventSystem = Bowser.Parser.ParsedResult;

Part of sdk-js

Maintainers

License

See the LICENSE file for license details

Credits

Made with 🔥 and ❄️ by XYLabs