Skip to content

Instantly share code, notes, and snippets.

@Pash237
Last active September 28, 2018 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pash237/dcf3ca2edcfb6b9ed148e91917307eb2 to your computer and use it in GitHub Desktop.
Save Pash237/dcf3ca2edcfb6b9ed148e91917307eb2 to your computer and use it in GitHub Desktop.
static func didStartSelectingLocation(type: RoutePointType)
{
if type == .source {
logEvent("click_map_from_go")
}
if type == .destination {
logEvent("click_map_where_go")
}
}
static func didTouchLocationMarker(type: RoutePointType)
{
if type == .source {
logEvent("click_map_from_geo")
}
if type == .destination {
logEvent("click_map_where_geo")
}
}
static func didSelectAddress(type: RoutePointType)
{
if type == .source {
logEvent("history_from_go")
}
if type == .destination {
logEvent("history_where_go")
}
}
static func didTouchPointOnMapButton(type: RoutePointType)
{
if type == .source {
logEvent("history_map_from_go")
}
if type == .destination {
logEvent("click_map_go")
}
}
static func didStartEditingLocationFromSearchScreen(type: RoutePointType)
{
if type == .source {
logEvent("click_searchView_from")
}
if type == .destination {
logEvent("click_searchView_where")
}
}
static func didTouchSearchButton()
{
logEvent("click_searchTaxi")
}
static func didTouchBackButton()
{
logEvent("click_button_back")
}
static func didOpenMenu()
{
logEvent("click_services")
}
static func didChangeNotificationSettings(enabled: Bool)
{
logEvent("click_button_notice_\(enabled ? "on" : "off")")
}
static func didTouchShareButton()
{
logEvent("click_button_sharing")
}
static func didTouchRateApplicationButton()
{
logEvent("click_button_rating")
}
static func didTouchFeedbackButton()
{
logEvent("click_button_feedback")
}
static func didPickTaxiService(search: Search, searchResult: SearchResult)
{
if let orderTaxiURL = searchResult.orderTaxiURL, UIApplication.shared.canOpenURL(orderTaxiURL) {
APIClient.shared.sendTaxiServiceTouchedAnalytics(search: search, taxiService: searchResult.taxiService, openedInstallURL: false)
} else if let appInstallURL = searchResult.appInstallURL, UIApplication.shared.canOpenURL(appInstallURL) {
APIClient.shared.sendTaxiServiceTouchedAnalytics(search: search, taxiService: searchResult.taxiService, openedInstallURL: true)
}
logEvent("click_\(searchResult.taxiService.identifier)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment