
Security News
upm Launches as a Fast, Tiny Package Manager Written in TypeScript
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.
openpanel-miniprogram
Advanced tools
OpenPanel SDK for WeChat Mini Programs. Zero external runtime dependencies.
npm install openpanel-miniprogram
// app.ts
import { OpenPanel } from 'openpanel-miniprogram';
const op = new OpenPanel({
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET', // required for self-hosted instances
apiUrl: 'https://your-instance.com/api', // default: https://api.openpanel.dev
});
App({
onLaunch() {
// identify user when ready
op.identify({ profileId: 'user-123', firstName: 'Alice' });
},
logout() {
op.clear();
},
});
// pages/index/index.ts
import { op } from '~/app';
Page({
onTap() {
op.track('button_click', { button: 'buy_now' });
},
});
interface MiniprogramOpenPanelOptions {
clientId: string; // Required
clientSecret?: string; // Required for self-hosted instances
apiUrl?: string; // Default: https://api.openpanel.dev
requestAdapter?: WxRequestAdapter; // Default: wx
storageAdapter?: StorageAdapter; // Default: wx.getStorageSync/setStorageSync
waitForProfile?: boolean; // Queue events until identify() is called
filter?: (payload) => boolean; // Filter events before sending
disabled?: boolean; // Disable all tracking
debug?: boolean; // Log to console
}
op.track(name, properties?)
op.screenView(pagePath, properties?) // shorthand for track('screen_view', { __path: pagePath })
op.revenue(amount, properties?) // shorthand for track('revenue', { __revenue: amount })
op.identify({ profileId, firstName?, lastName?, email?, avatar?, properties? })
op.clear() // clear user identity, groups, device/session IDs
op.setGroup(groupId) // add user to a group
op.setGroups(groupIds) // add user to multiple groups
op.upsertGroup({ id, type, name, properties? }) // create/update a group
op.increment({ profileId, property, value? })
op.decrement({ profileId, property, value? })
op.setGlobalProperties({ key: 'value' }) // merged into every event
op.ready() // enable SDK + flush queued events
op.flush() // manually flush offline queue
op.destroy() // cleanup network listeners
op.getDeviceId() // get persisted device ID
op.getSessionId() // get persisted session ID
Automatically track common scenarios with per-event switches (all enabled by default):
| Event | Trigger | Properties |
|---|---|---|
screen_view | every Page.onShow | __path page path |
app_launch | App.onLaunch | __scene / __query / __path from wx.getLaunchOptionsSync() |
page_share | onShareAppMessage / onShareTimeline | __path page path, __entry (menu / timeline) |
import { OpenPanel, installAutoTracking } from 'openpanel-miniprogram';
const op = new OpenPanel({ clientId: 'YOUR_CLIENT_ID' });
installAutoTracking(op); // all events on
// disable specific events
installAutoTracking(op, { events: { screen_view: false } });
Events are automatically queued when the device is offline and flushed when connectivity returns. The queue is persisted to wx.storage so events survive app restarts.
wx.request via configurable adapterwx.storage__platform, __os, __model, __system, __screen, __wxVersion, __sdkVersionMIT
FAQs
OpenPanel SDK for WeChat Mini Programs
The npm package openpanel-miniprogram receives a total of 19 weekly downloads. As such, openpanel-miniprogram popularity was classified as not popular.
We found that openpanel-miniprogram demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.