Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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 nameproperty valuenotes
section_nameNew Restaurantsfrom title
section_templateoutlet_4_cardfrom section_template
restaurant_id997
restaurant_name_enCafe Claire
restaurant_name_thCafe Claire TH
branch_id12(if any, not mandatory)
position3restaurant position

Trigger: when click tag (cuisine, dining style, location) Event Name: Homepage Section Tapped (Tags Object) Event Property:

property nameproperty valuenotes
section_nameTop Cuisinefrom title
section_templatetag_defaultfrom section_template
tag_id10
tag_nameInternational
tag_name_enInternational
tag_typecuisine
position3tag position

Trigger: when click banner promotions Event Name: Homepage Section Tapped (Banner Promotions) Event Property:

property nameproperty valuenotes
section_namePromotionsfrom title
section_templatepromotion_bannerfrom section_template
banner_nameMala Hub
target_urlhttps://web.hungryhub.com/restaurants/group/mala-hub?locale=en
position4banner position

Trigger: when click group card Event Name: Homepage Section Tapped (Group Card) Event Property:

property nameproperty valuenotes
section_nameTrendingfrom title
section_templategroup_cardfrom section_template
slugtrending

Trigger: when click hh special Event Name: Homepage Section Tapped (HH Specials) Event Property:

property nameproperty valuenotes
section_nameHungry Hub Specialfrom title
section_templatehh_specialfrom section_template
icon_nameMost Loved by Users
target_urlhttps://web.hungryhub.com/restaurants/search?sort=most_reviewed&locale=th
position4icon position

Trigger: when click homepage icon Event Name: Homepage Section Tapped (Homepage Icons) Event Property:

property nameproperty valuenotes
section_nameHungry Hub Iconfrom title
section_templatehomepage_iconfrom section_template
title_nameAll You Can Eat
target_urlhttps://web.hungryhub.com/restaurants/search?tag_id%5B%5D=1541&tag_name%5B%5D=All+You+Can+Eat
position4icon position
typeurl_basetag_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)