Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
shore-tracker
Advanced tools
A generic module to track user actions inside Shore
npm install @shore/shore-tracker
Ensure you are in an ES6 environment, if not use polyfills!
import { initialize } from '@shore/shore-tracker';
// 1. Initializing the tracker
initialize({
trackMethod: analytics.track // The track method of some third party analytics tracker
});
import { createReduxMiddleware } from '@shore/shore-tracker';
import actionTypes from 'constants/action-types';
const { HIDE, SHOW, SAVE } = actionTypes.currentCustomer.additionalAttributes;
const Shore = window.Shore;
// Sample helper method to generate event data
const generateTrackerData = eventName => (state, actionPayload) => ({
eventName,
eventPayload: {
...actionPayload,
...{
'Merchant uuid': Shore.merchant_uuid,
'Merchant account id': Shore.merchant_account_id,
'Merchant name': Shore.merchantName,
'Merchant account name': Shore.merchant_account_name,
name: Shore.merchant_account_full_name,
phone: Shore.merchantPhone,
website: Shore.merchantWebsite,
},
},
});
// This map tells which redux action will be track with what data
const mapping = {
[HIDE]: generateTrackerData('customer_detail_additional_attributes_hide'),
[SHOW]: generateTrackerData('customer_detail_additional_attributes_show'),
[SAVE]: generateTrackerData('customer_detail_additional_attributes_save')
};
// Creating the middleware
const trackerMiddleware = createReduxMiddleware(mapping);
// Then when creating redux store you can use it like so
let store = createStore(
reducers,
applyMiddleware(trackerMiddleware)
)
// Then redux will track the actions mentioned inside the mapping
FAQs
A generic module to track user actions inside Shore
We found that shore-tracker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.