Skip to content

Commit 572a889

Browse files
committed
docs: relocated commerce properties to new section
1 parent 47adeea commit 572a889

File tree

1 file changed

+217
-29
lines changed

1 file changed

+217
-29
lines changed

README.md

Lines changed: 217 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
- [Testing: Sample Test App](#testing-sample-test-app)
4949
- [Link Data: Universal Object Properties](#link-data-universal-object-properties)
5050
- [Link Data: Deep Link Properties](#link-data-deep-link-properties)
51+
- [Link Data: Commerce Properties](#link-data-commerce-properties)
5152
- [Compiling: Cordova Dependencies](#compiling-cordova-dependencies)
5253
- [Compiling: Show Console Logs](#compiling-show-console-logs)
5354
- [Compiling: Updating the Branch SDK](#compiling-updating-the-branch-sdk)
@@ -477,7 +478,7 @@
477478

478479
- #### Track Event
479480

480-
- Registers custom events
481+
- Registers a custom event
481482

482483
- Events named `open`, `close`, `install`, and `referred session` are Branch restricted
483484

@@ -506,17 +507,19 @@
506507

507508
- #### Track Commerce
508509

509-
- Registers custom commerce events
510+
- Registers a custom commerce event
510511

511512
- Recommended to [Track User](#track-user) before [Track Commerce](#track-commerce) to associate commerce events with a user
513+
514+
- [Track commerce properties](#link-data-commerce-properties) for `Currency` and `Category`
512515

513516
- Verify on the [Branch Dashboard](https://dashboard.branch.io/liveview/commerce)
514517

515518
```js
516519
// only revenue is required
517520
var event = {
518521
'revenue': 50.29,
519-
'currency': 'USD',
522+
'currency': 148, // USD
520523
'transactionID': 'transaction id',
521524
'coupon': 'coupon',
522525
'shipping': 2.22,
@@ -529,7 +532,7 @@
529532
'price': 4.99,
530533
'quantity': 2,
531534
'brand': 'brand',
532-
'category': 1,
535+
'category': 17, // Software
533536
'variant': 'variant'
534537
},
535538
{
@@ -540,7 +543,7 @@
540543
}
541544
]
542545
}
543-
546+
544547
// optional fields
545548
var metadata = {
546549
'custom_dictionary': 123,
@@ -556,30 +559,6 @@
556559
})
557560
```
558561

559-
| Value | Category |
560-
| :-: | --- |
561-
| 0 | AnimalSupplies |
562-
| 1 | Apparel |
563-
| 2 | ArtsEntertainment |
564-
| 3 | BabyToddler |
565-
| 4 | BusinessIndustrial |
566-
| 5 | CamerasOptics |
567-
| 6 | Electronics |
568-
| 7 | FoodBeverageTobacco |
569-
| 8 | Furniture |
570-
| 9 | Hardware |
571-
| 10 | HealthBeauty |
572-
| 11 | HomeGarden |
573-
| 12 | LuggageBags |
574-
| 13 | Mature |
575-
| 14 | Media |
576-
| 15 | OfficeSupplies |
577-
| 16 | Religious |
578-
| 17 | Software |
579-
| 18 | SportingGoods |
580-
| 19 | ToysGames |
581-
| 20 | VehiclesParts |
582-
583562
- #### Handle Referrals
584563

585564
- Referral points are obtained from events triggered by users from rules created on the [Branch Dashboard](https://dashboard.branch.io/referrals/rules)
@@ -871,6 +850,215 @@
871850
| $twitter_player_width | | Set the player’s width in pixels
872851
| $twitter_player_height | | Set the player’s height in pixels
873852

853+
- #### Link Data: Commerce Properties
854+
855+
- For [Track Commerce](#track-commerce)
856+
857+
| Value | Category |
858+
| --- | --- |
859+
| 0 | Animals & Pet Supplies |
860+
| 1 | Apparel & Accessories |
861+
| 2 | Arts & Entertainment |
862+
| 3 | Baby & Toddler |
863+
| 4 | Business & Industrial |
864+
| 5 | Camera & Optics |
865+
| 6 | Electronics |
866+
| 7 | Food, Beverage & Tobacco |
867+
| 8 | Furniture |
868+
| 9 | Hardware |
869+
| 10 | Health & Beauty |
870+
| 11 | Home & Garden |
871+
| 12 | Luggage & Bags |
872+
| 13 | Mature |
873+
| 14 | Media |
874+
| 15 | Office Supplies |
875+
| 16 | Religious & Ceremonial |
876+
| 17 | Software |
877+
| 18 | Sporting Goods |
878+
| 19 | Toys & Games |
879+
| 20 | Vehicles & Parts |
880+
881+
| Value | Currency |
882+
| --- | --- |
883+
| 0 | AED |
884+
| 1 | AFN |
885+
| 2 | ALL |
886+
| 3 | AMD |
887+
| 4 | ANG |
888+
| 5 | AOA |
889+
| 6 | ARS |
890+
| 7 | AUD |
891+
| 8 | AWG |
892+
| 9 | AZN |
893+
| 10 | BAM |
894+
| 11 | BBD |
895+
| 12 | BDT |
896+
| 13 | BGN |
897+
| 14 | BHD |
898+
| 15 | BIF |
899+
| 16 | BMD |
900+
| 17 | BND |
901+
| 18 | BOB |
902+
| 19 | BOV |
903+
| 20 | BRL |
904+
| 21 | BSD |
905+
| 22 | BTN |
906+
| 23 | BWP |
907+
| 24 | BYN |
908+
| 25 | BYR |
909+
| 26 | BZD |
910+
| 27 | CAD |
911+
| 28 | CDF |
912+
| 29 | CHE |
913+
| 30 | CHF |
914+
| 31 | CHW |
915+
| 32 | CLF |
916+
| 33 | CLP |
917+
| 34 | CNY |
918+
| 35 | COP |
919+
| 36 | COU |
920+
| 37 | CRC |
921+
| 38 | CUC |
922+
| 39 | CUP |
923+
| 40 | CVE |
924+
| 41 | CZK |
925+
| 42 | DJF |
926+
| 43 | DKK |
927+
| 44 | DOP |
928+
| 45 | DZD |
929+
| 46 | EGP |
930+
| 47 | ERN |
931+
| 48 | ETB |
932+
| 49 | EUR |
933+
| 50 | FJD |
934+
| 51 | FKP |
935+
| 52 | GBP |
936+
| 53 | GEL |
937+
| 54 | GHS |
938+
| 55 | GIP |
939+
| 56 | GMD |
940+
| 57 | GNF |
941+
| 58 | GTQ |
942+
| 59 | GYD |
943+
| 60 | HKD |
944+
| 61 | HNL |
945+
| 62 | HRK |
946+
| 63 | HTG |
947+
| 64 | HUF |
948+
| 65 | IDR |
949+
| 66 | ILS |
950+
| 67 | INR |
951+
| 68 | IQD |
952+
| 69 | IRR |
953+
| 70 | ISK |
954+
| 71 | JMD |
955+
| 72 | JOD |
956+
| 73 | JPY |
957+
| 74 | KES |
958+
| 75 | KGS |
959+
| 76 | KHR |
960+
| 77 | KMF |
961+
| 78 | KPW |
962+
| 79 | KRW |
963+
| 80 | KWD |
964+
| 81 | KYD |
965+
| 82 | KZT |
966+
| 83 | LAK |
967+
| 84 | LBP |
968+
| 85 | LKR |
969+
| 86 | LRD |
970+
| 87 | LSL |
971+
| 88 | LYD |
972+
| 89 | MAD |
973+
| 90 | MDL |
974+
| 91 | MGA |
975+
| 92 | MKD |
976+
| 93 | MMK |
977+
| 94 | MNT |
978+
| 95 | MOP |
979+
| 96 | MRO |
980+
| 97 | MUR |
981+
| 98 | MVR |
982+
| 99 | MWK |
983+
| 100 | MXN |
984+
| 101 | MXV |
985+
| 102 | MYR |
986+
| 103 | MZN |
987+
| 104 | NAD |
988+
| 105 | NGN |
989+
| 106 | NIO |
990+
| 107 | NOK |
991+
| 108 | NPR |
992+
| 109 | NZD |
993+
| 110 | OMR |
994+
| 111 | PAB |
995+
| 112 | PEN |
996+
| 113 | PGK |
997+
| 114 | PHP |
998+
| 115 | PKR |
999+
| 116 | PLN |
1000+
| 117 | PYG |
1001+
| 118 | QAR |
1002+
| 119 | RON |
1003+
| 120 | RSD |
1004+
| 121 | RUB |
1005+
| 122 | RWF |
1006+
| 123 | SAR |
1007+
| 124 | SBD |
1008+
| 125 | SCR |
1009+
| 126 | SDG |
1010+
| 127 | SEK |
1011+
| 128 | SGD |
1012+
| 129 | SHP |
1013+
| 130 | SLL |
1014+
| 131 | SOS |
1015+
| 132 | SRD |
1016+
| 133 | SSP |
1017+
| 134 | STD |
1018+
| 135 | SYP |
1019+
| 136 | SZL |
1020+
| 137 | THB |
1021+
| 138 | TJS |
1022+
| 139 | TMT |
1023+
| 140 | TND |
1024+
| 141 | TOP |
1025+
| 142 | TRY |
1026+
| 143 | TTD |
1027+
| 144 | TWD |
1028+
| 145 | TZS |
1029+
| 146 | UAH |
1030+
| 147 | UGX |
1031+
| 148 | USD |
1032+
| 149 | USN |
1033+
| 150 | UYI |
1034+
| 151 | UYU |
1035+
| 152 | UZS |
1036+
| 153 | VEF |
1037+
| 154 | VND |
1038+
| 155 | VUV |
1039+
| 156 | WST |
1040+
| 157 | XAF |
1041+
| 158 | XAG |
1042+
| 159 | XAU |
1043+
| 160 | XBA |
1044+
| 161 | XBB |
1045+
| 162 | XBC |
1046+
| 163 | XBD |
1047+
| 164 | XCD |
1048+
| 165 | XDR |
1049+
| 166 | XFU |
1050+
| 167 | XOF |
1051+
| 168 | XPD |
1052+
| 169 | XPF |
1053+
| 170 | XPT |
1054+
| 171 | XSU |
1055+
| 172 | XTS |
1056+
| 173 | XUA |
1057+
| 174 | XXX |
1058+
| 175 | YER |
1059+
| 176 | ZAR |
1060+
| 177 | ZMW |
1061+
8741062
- #### Compiling: Cordova Dependencies
8751063

8761064
- Node

0 commit comments

Comments
 (0)