-
Notifications
You must be signed in to change notification settings - Fork 1
/
data-to-set-branch-view-data.html
28 lines (27 loc) · 1.44 KB
/
data-to-set-branch-view-data.html
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
<html>
<head>
<script>
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="https://cdn.branch.io/branch-latest.min.js";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener applyCode autoAppIndex banner closeBanner closeJourney creditHistory credits data deepview deepviewCta first getCode init link logout redeem referrals removeListener sendSMS setBranchViewData setIdentity track validateCode trackCommerceEvent logEvent disableTracking".split(" "), 0);
// init Branch
branch.init('key_live_chyxR8sQGM9AEuhYZBE4PbngtvaSUG1K', function(err, data) {
if (data != null && data != "") {
var branchJourneysData = {
data: {
'$og_title': data.data_parsed['$og_title'],
'$og_description': data.data_parsed['$og_description'],
'$og_image_url': data.data_parsed['$og_image_url'],
'$deeplink': data.data_parsed['$deeplink'],
'$deeplink_v2': data.data_parsed['$deeplink_v2'],
}
};
branch.setBranchViewData(branchJourneysData);
} else {
console.log("No branch referring link. User did not come directly to this page via a Branch link");
}
});
branch.setBranchViewData(branchJourneysData);
</script>
</head>
<body>
</body>
</html>