Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@sitecore-cloudsdk/events
Advanced tools
This package provides browser- and server-side functions to capture events in your app and send them to Sitecore. Events are for collecting behavioral data about your users as they interact with your app.
This package provides browser- and server-side functions to capture events in your app and send them to Sitecore. Events are for collecting behavioral data about your users as they interact with your app.
npm install @sitecore-cloudsdk/events
CloudSDK
function, available in the core
package.pageView
- send a VIEW event.identity
- send an IDENTITY event.form
- send a FORM event (browser-side only).event
- send SC_SEARCH events, other standard events, or a custom event.Capture and send a VIEW event from the browser side:
'use client';
import { useEffect } from 'react';
import { CloudSDK } from '@sitecore-cloudsdk/core/browser';
import { pageView } from '@sitecore-cloudsdk/events/browser';
export default function Home() {
useEffect(() => {
CloudSDK({
/* Initialization settings. See `core` package code examples. */
})
.addEvents()
.initialize();
// Send VIEW event:
pageView();
}, []);
return <></>;
}
Capture and send a VIEW event from the server side:
import type { NextRequest, NextResponse } from 'next/server';
import { CloudSDK } from '@sitecore-cloudsdk/core/server';
import { pageView } from '@sitecore-cloudsdk/events/server';
export async function middleware(request: NextRequest) {
const response = NextResponse.next();
await CloudSDK(request, response, {
/* Initialization settings. See `core` package code examples. */
})
.addEvents()
.initialize();
// Send VIEW event:
await pageView(request);
return response;
}
FAQs
This package provides browser- and server-side functions to capture events in your app and send them to Sitecore. Events are for collecting behavioral data about your users as they interact with your app.
The npm package @sitecore-cloudsdk/events receives a total of 7,447 weekly downloads. As such, @sitecore-cloudsdk/events popularity was classified as popular.
We found that @sitecore-cloudsdk/events demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.