Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
CDPCloud Portal
Sitecore CDP Developer Documentation
  • Sitecore CDPでの開発
  1. 機能
  1. Sitecore CDP Developer Documentation
  2. ストリームAPI

窓。Engage.triggerExperiences()

Markdown version
日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

triggerExperiences()機能は、ライブ中のすべてのウェブ体験やウェブ実験をSitecore Personalize再実行します。この関数は、例えばパーソナライズを実行したい場合に特に有用です。

  • 複数ページアプリケーションでは、ユーザーの入力に応じて同じページに表示します。
  • シングルページアプリケーション(SPA)では、ユーザーがルート間を移動する際に、

この機能は、クライアント側のEngage.init()(engage-init.md "Engage.init(settings)")関数のsettingsオブジェクトでwebPersonalization(settings-object.html#UUID-60c6365e-ff13-69eb-f0eb-aab96f66de3e_para-idm1903353065604344)属性をtrueに設定しておいた場合にのみ使えます。

こちらは、triggerExperiences() 機能を使ってウェブ体験やウェブ実験が常にSPAアプリの /contactルート上で動作するようにする方法の例です。

import { init } from "@sitecore/engage";

let engage;

const loadEngage = async () => { engage = await init({ // ... webPersonalization: true });

// Make sure web experiences and web experiments always run in SPA apps: if (window.location.pathname.includes("/contact")) { window.Engage.triggerExperiences(); } };

この記事を改善するための提案がある場合は、 お知らせください!

© Copyright , Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use
CDPCloud Portal