Homepage Log Event
There are some events that we've implemented in our current homepage. CleverTap, facebook, google. Trigger: when click restaurant card Event Name: Homepage Section Tapped (Restaurant Object) Event Property:
| property name | property value | notes |
|---|---|---|
| section_name | New Restaurants | from title |
| section_template | outlet_4_card | from section_template |
| restaurant_id | 997 | |
| restaurant_name_en | Cafe Claire | |
| restaurant_name_th | Cafe Claire TH | |
| branch_id | 12 | (if any, not mandatory) |
| position | 3 | restaurant position |
Trigger: when click tag (cuisine, dining style, location) Event Name: Homepage Section Tapped (Tags Object) Event Property:
| property name | property value | notes |
|---|---|---|
| section_name | Top Cuisine | from title |
| section_template | tag_default | from section_template |
| tag_id | 10 | |
| tag_name | International | |
| tag_name_en | International | |
| tag_type | cuisine | |
| position | 3 | tag position |
Trigger: when click banner promotions Event Name: Homepage Section Tapped (Banner Promotions) Event Property:
| property name | property value | notes |
|---|---|---|
| section_name | Promotions | from title |
| section_template | promotion_banner | from section_template |
| banner_name | Mala Hub | |
| target_url | https://web.hungryhub.com/restaurants/group/mala-hub?locale=en | |
| position | 4 | banner position |
Trigger: when click group card Event Name: Homepage Section Tapped (Group Card) Event Property:
| property name | property value | notes |
|---|---|---|
| section_name | Trending | from title |
| section_template | group_card | from section_template |
| slug | trending |
Trigger: when click hh special Event Name: Homepage Section Tapped (HH Specials) Event Property:
| property name | property value | notes |
|---|---|---|
| section_name | Hungry Hub Special | from title |
| section_template | hh_special | from section_template |
| icon_name | Most Loved by Users | |
| target_url | https://web.hungryhub.com/restaurants/search?sort=most_reviewed&locale=th | |
| position | 4 | icon position |
Trigger: when click homepage icon Event Name: Homepage Section Tapped (Homepage Icons) Event Property:
| property name | property value | notes |
|---|---|---|
| section_name | Hungry Hub Icon | from title |
| section_template | homepage_icon | from section_template |
| title_name | All You Can Eat | |
| target_url | https://web.hungryhub.com/restaurants/search?tag_id%5B%5D=1541&tag_name%5B%5D=All+You+Can+Eat | |
| position | 4 | icon position |
| type | url_base | tag_base/url_base |
Hybrid Event: onCleverTapPushEvent Response:
{
"event_name": "Homepage Section Tapped", // event name
"data": [ // event property
{
"name": "section_name",
"value": "New Restaurants"
},
{
"name": "section_template",
"value": "outlet_4_card"
},
{
"name": "restaurant_id",
"value": "997"
},......
]
}
in Android:
HashMap<String, Object> map = new HashMap<>();
for (int i = 0; i < dataList.size(); i++) {
String name = data.get(i).getName();
String value = data.get(i).getValue();
map.put(name, value);
}
clevertapDefaultInstance.pushEvent(event_name, map);
in iOS:
let props = [
"section_name": "New Restaurants",
"section_template": "outlet_4_card",
"restaurant_name": "Cafe Claire",
.....
] as [String : Any]
CleverTap.sharedInstance()?.recordEvent(event_name, withProps: props)
Hybrid Event: onGooglePushEvent Response:
{
"event_name": "Homepage Section Tapped",
"data": [
{
"name": "section_name",
"type": "string",
"string_value": "New Restaurants",
"number_value": null,
"items": null
},
{
"name": "section_template",
"type": "string",
"string_value": "outlet_4_card",
"number_value": null,
"items": null
},
.....
]
}
in Android will be like this:
Bundle bundle = new Bundle();
bundle.putString("section_name", "New Restaurants");
bundle.putString("section_template", "outlet_4_card");
.....
mFirebaseAnalytics.logEvent(event_name, bundle);
in iOS will be like this:
var productDetails: [String: Any] = [
"section_name": "New Restaurants",
"section_template": "outlet_4_card",
......
]
// Log event
Analytics.logEvent(event_name, parameters: productDetails)