クロスサイトリコメンデーション

一般的なJavascriptの組み込みにおいては、Webサイトのドメインのもとにストアしたユーザ識別用のファーストパーティーCookieを使用してユーザを特定します。この詳細についてはCookieとローカルストレージのドキュメントを参照してください。残念ながらこの機能は複数のサイトをまたいだユーザの特定をすることはできません。もし、クロスサイトリコメンデーション(複数の異なるWebサイト感でリコメンデーションを表示する)を行いたい場合は、ファーストパーティーCookieの使用は適していません。

Webページ内でFetchを複数回実行している場合(Webサイト内でのリコメンデーションまたはクロスサイトリコメンデーションにおいて)は、$p("init") のドキュメントで説明した、multiFetchを有効化する必要があります。

Cross-site recommendations by JavaScript key

異なるJavascriptキーを持った複数のドメインでも、registerおよびトラックする際にoptsにJavascriptキーを指定することでクロスサイトリコメンデーションを行うことができます。下記の例は、お客様のWebサイトにLiftIgniterのリコメンデーションを送信するための簡単なテストです。

// 'default-widget'のウィジェットに100件のリコメンデーションを取得するためのregisterコール
// JSONのレスポンスを出力するためのシンプルなcallback
$p('register', {
	max: 100, // あらゆるアイテムが見れるように大量のリクエストを送信しました
  widget: 'default-widget', // ウィジェット名
 	opts: {jsk: "vba4vdhq7eo382ub"},							
  callback: function(resp) {
		console.log(JSON.stringify(resp, null, 2));
  }
});
// registerコールを実行する。
$p('fetch');

下記は、LiftIgniterのregister、表示、トラッキングをWebサイトに組み込むためのひな形です。Modelクエリ(Javascript)のドキュメントで説明したとおり、基本的にはリコメンデーションを表示してトラックする同じプロセスを実行しますが、ここではregisterとtrackのoptsにjskを含めます。

// 'default-widget'のウィジェットに100件のリコメンデーションを取得するためのregisterコール
// JSONのレスポンスを出力するためのシンプルなcallback
$p('register', {
	max: 100, // あらゆるアイテムが見れるように大量のリクエストを送信しました
  widget: 'default-widget', // ウィジェット名
 	opts: {jsk: "vba4vdhq7eo382u"},							
  callback: function(resp) {
		console.log(JSON.stringify(resp, null, 2));
  	console.log("// TEST.");
    // 本番環境でrecsを起動するためには、ウィジェットの表示のドキュメントと、ウィジェットのトラッキングのドキュメントを参照してください。
    // $p('render', ...) 
    $p("track", {
      elements: ...
      ...,
      opts: {jsk: "vba4vdhq7eo382u"},
    })
  }
});
// registerコールを実行する。
$p('fetch');

🚧

Receiving ML-trained cross-site recommendations requires activation by LiftIgniter

Please be in touch with the LiftIgniter team at support@liftigniter.com in order to be have this feature activated. In order to protect customer separation, as well as for quality control purposes, we activate cross-site model training between properties only upon customer request. Without requesting us, you will receive a mostly static list of popular recommendations rather than context-specific or user-specific recommendations.

Cross-site recommendations from backend

If you are using Model Queries from Backend (i.e., sending the model query from the backend), then for cross-site recommendations, you need to make sure of the following:

  • The API key you use should be of the property for which you want recommendations.
  • The url or id field that you include should be from the original property.
  • Please include the gid field as instructed at Model Queries from Backend.