이 페이지는 AI로 자동 번역되었으며 부정확한 내용이 포함될 수 있습니다. 번역 오류를 신고하려면 페이지 오른쪽 목차 아래에 있는 피드백 기능을 사용하세요.
Braze 액션 딥링크
Braze 액션을 사용하면 ‘딥링크’를 통해 네이티브 SDK 기능을 수행할 수 있습니다.
Braze 대시보드에는 인앱 메시지 및 Content Cards에서 사용할 수 있는 몇 가지 표준 클릭 시 동작(푸시 권한 요청, 커스텀 이벤트 기록, 커스텀 속성 기록)이 포함되어 있습니다.
다른 모든 동작을 수행하거나 여러 동작을 결합하려면 이 가이드를 사용하여 자체 Braze 액션 딥링크를 구성하세요.
SDK 지원
brazeActions:// 딥링크 스키마는 인앱 메시지 및 Content Cards 내에서 딥링크 또는 리디렉션 옵션이 있는 모든 곳에서 사용할 수 있습니다.
HTML 인앱 메시지의 경우 딥링크가 HTML 메시지 유형에서 지원되지 않으므로 대신 Javascript Bridge를 사용하세요.
스키마
container 동작 유형 내에 여러 동작 steps를 포함할 수 있습니다. container 없이 단일 단계만 사용하는 것도 유효합니다.
1
2
3
4
{
"type": "container",
"steps": []
}
개별 step에는 동작 type과 선택적 args 배열이 포함됩니다.
1
2
3
4
{
"type": "logCustomEvent",
"args": ["event name", {"event": ["properties"]}]
}
URI
Braze 액션 URI 스키마는 brazeActions://v1/{base64encodedJsonString}입니다.
다음 JavaScript는 JSON 문자열을 인코딩하고 디코딩하는 방법을 보여줍니다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function decode(encoded) {
const binary = window.atob(encoded.replace(/-/g, '+').replace(/_/g, '/'));
let bits8 = new Uint8Array(binary.length);
for (let i = 0; i < binary.length; i++) {
bits8[i] = binary.charCodeAt(i);
}
const bits16 = new Uint16Array(bits8.buffer);
return String.fromCharCode(...bits16);
}
/**
* Returns a url-safe base64 encoded string of the input.
* Unicode inputs are accepted.
* Converts a UTF-16 string to UTF-8 to comply with base64 encoding limitations.
*/
function encode(input) {
// Split the original 16-bit char code into two 8-bit char codes then
// reconstitute a new string (of double length) using those 8-bit codes
// into a UTF-8 string.
const codeUnits = new Uint16Array(input.length);
for (let i = 0; i < codeUnits.length; i++) {
codeUnits[i] = input.charCodeAt(i);
}
const charCodes = new Uint8Array(codeUnits.buffer);
let utf8String = "";
for (let i = 0; i < charCodes.byteLength; i++) {
utf8String += String.fromCharCode(charCodes[i]);
}
return btoa(utf8String).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
}
지원되는 동작
| 유형 | 인수 |
|---|---|
container |
수행할 다른 동작의 배열 |
logCustomEvent |
1. event name2. event properties JSON object (선택 사항) |
setEmailNotificationSubscriptionType |
"opted_in" | "subscribed" | "unsubscribed" |
setPushNotificationSubscriptionType |
"opted_in" | "subscribed" | "unsubscribed" |
setCustomUserAttribute |
1. attribute_name2. attribute_value |
requestPushPermission |
N/A |
openLink |
1. url2. openInNewTab (부울) |
openLinkInWebview |
url |
addToSubscriptionGroup |
subscriptionGroupId |
removeFromSubscriptionGroup |
subscriptionGroupId |
addToCustomAttributeArray |
1. attribute_name2. attribute_value |
removeFromCustomAttributeArray |
1. attribute_name2. attribute_value |
JSON 인코더
JSON 문자열을 입력하여 결과 brazeActions:// URI를 확인하세요. 또는 brazeActions:// URI를 입력하여 해당 JSON을 디코딩하세요.
JSON 입력
딥링크 출력
New Stuff!