ページ読み込みを実行
フッターやヘッダーにあるフォントを AB テストするなど、web チャネルでページの読み込みが発生した場合に表示する必要があるエクスペリエンスがある場合は、execute
フィールドで pageLoad
を指定して、適用するすべての変更を取得できます。
curl -X POST \
'https://demo.tt.omtrdc.net/rest/v1/delivery?client=demo&sessionId=d359570e04f14e1faeeba02d6ab9914e' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"id": {
"tntId": "84e8d0e211054f18af365d65f45e902b.28_131"
},
"context": {
"channel": "web",
"window": {
"width": 1819,
"height": 842
},
"browser": {
"host": "target.enablementadobe.com"
},
"address": {
"url": "https://target.enablementadobe.com/react/demo/#/"
}
},
"execute": {
"pageLoad": {}
}
}'
上記の呼び出し例では、ページ https://target.enablementadobe.com/react/demo/#/
ージの読み込み時にユーザーに表示するエクスペリエンスを取得しています。
{
"status": 200,
"requestId": "355ebc47-edb6-481f-aeae-ae55d71afaca",
"client": "demo",
"id": {
"tntId": "84e8d0e211054f18af365d65f45e902b.28_131"
},
"edgeHost": "mboxedge28.tt.omtrdc.net",
"execute": {
"pageLoad": {
"options": [
{
"content": [
{
"type": "setHtml",
"selector": "#app > DIV:nth-of-type(1) > DIV:nth-of-type(1) > NAV.nav:eq(0) > DIV.container:eq(0) > DIV.nav-right:eq(0) > A.nav-item:eq(0)",
"cssSelector": "#app > DIV:nth-of-type(1) > DIV:nth-of-type(1) > NAV:nth-of-type(1) > DIV:nth-of-type(1) > DIV:nth-of-type(2) > A:nth-of-type(1)",
"content": "Modified Home"
}
],
"type": "actions"
}
],
"metrics": [
{
"type": "click",
"selector": "#app > DIV:nth-of-type(1) > DIV:nth-of-type(2) > SECTION.section:eq(0) > DIV.container:eq(0) > FORM.col-md-4:eq(0) > DIV.form-group:eq(0) > BUTTON.btn:eq(0)",
"eventToken": "QPaLjCeI9qKCBUylkRQKBg=="
}
]
}
}
}
「content
」フィールドでは、ページ読み込み時に適用する必要のある変更を取得できます。 上記の例では、ヘッダー上のリンクに Modified Home という名前を付ける必要があることに注意してください。