![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@sitecore-cloudsdk/personalize
Advanced tools
This package provides browser- and server-side functions to run personalizations in your app. Personalization is for showing the most relevant content to your users.
This package provides browser- and server-side functions to run personalizations in your app. Personalization is for showing the most relevant content to your users.
npm install @sitecore-cloudsdk/personalize
CloudSDK
function, available in the core
package.events
package.personalize
function.Run personalizations from the browser side:
'use client';
import { useEffect } from 'react';
import { CloudSDK } from '@sitecore-cloudsdk/core/browser';
import { personalize } from '@sitecore-cloudsdk/personalize/browser';
export default function Home() {
const getPersonalizeData = async () => {
// Run interactive personalization:
const data = await personalize({
channel: 'WEB',
currency: 'EUR',
friendlyId: '<YOUR_EXPERIENCE_FRIENDLY_ID>'
});
console.log(data);
};
useEffect(() => {
CloudSDK({
/* Initialization settings. See `core` package code examples. */
})
.addEvents() // Initialize the `events` package to enable web personalization
.addPersonalize({ enablePersonalizeCookie: true, webPersonalization: true }) // Enable web personalization
.initialize();
getPersonalizeData();
}, []);
return <></>;
}
Run personalizations from the server side:
import type { NextRequest, NextResponse } from 'next/server';
import { CloudSDK } from '@sitecore-cloudsdk/core/server';
import { personalize } from '@sitecore-cloudsdk/personalize/server';
export async function middleware(request: NextRequest) {
const response = NextResponse.next();
await CloudSDK(request, response, {
/* Initialization settings. See `core` package code examples. */
})
.addPersonalize({ enablePersonalizeCookie: true })
.initialize();
// Run interactive personalization:
const data = await personalize(request, {
channel: 'WEB',
currency: 'EUR',
friendlyId: '<YOUR_EXPERIENCE_FRIENDLY_ID>'
});
console.log(data);
return response;
}
FAQs
This package provides browser- and server-side functions to run personalizations in your app. Personalization is for showing the most relevant content to your users.
The npm package @sitecore-cloudsdk/personalize receives a total of 0 weekly downloads. As such, @sitecore-cloudsdk/personalize popularity was classified as not popular.
We found that @sitecore-cloudsdk/personalize demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.