forked from lytics/pathforajs-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
video.sh
18 lines (16 loc) · 893 Bytes
/
video.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Create the base experience in Lytics Experience UI.
# Generate a new token, or paste an existing one below.
# https://learn.lytics.com/understanding/product-docs/account-management/managing-api-tokens
export LIOKEY={api_token_here}
# Paste the experience ID below and run the command to apply the overrides
curl -s -H "Authorization: $LIOKEY" \
-H "Content-Type: text/json" \
-XPATCH "http://api.lytics.io/api/experience/{experience_id}" -d '{
"experience": {
"vehicle": {
"detail_override": {
"onLoad": "function(e,t){var r=document.createElement(\"div\");r.className=\"pf-widget-video\",r.innerHTML=\"<iframe src=\\\"https://www.youtube.com/embed/tG7vx7-3sl0\\\" frameborder=\\\"0\\\" allowfullscreen></iframe>\";var i=t.widget.querySelector(\".pf-widget-content\"),o=t.widget.querySelector(\".pf-widget-text\");i.insertBefore(r,o)}"
}
}
}
}' | jq '.'