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

We track homepage interaction events to measure user behavior and optimize section performance across platforms. We have implemented the following events in our current homepage for CleverTap, Facebook, and Google.

Trigger: when clicking 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 clicking 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 clicking 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 clicking 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 clicking 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 clicking 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: onFacebookPushEvent Response:

{
	"event_name": "Homepage Section Tapped",
	"data": {
		"section_name": "New Restaurants",
		"section_template": "outlet_4_card",
		"restaurant_id": "997"
	}
}

in Android:

Bundle params = new Bundle();
params.putString("section_name", "New Restaurants");
params.putString("section_template", "outlet_4_card");
params.putString("restaurant_id", "997");
AppEventsLogger.newLogger(context).logEvent("Homepage Section Tapped", params);

in iOS:

let parameters: [AppEvents.ParameterName: Any] = [
	.init("section_name"): "New Restaurants",
	.init("section_template"): "outlet_4_card",
	.init("restaurant_id"): "997"
]
AppEvents.shared.logEvent(.init("Homepage Section Tapped"), parameters: parameters)

Hybrid Event: onCleverTapPushEvent Response:

{
	"event_name": "Homepage Section Tapped",
	"data": [
		{
			"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": {
    "section_name": "New Restaurants",
    "section_template": "outlet_4_card"
  }
}

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)