","social":[{"fieldname":"URL","value":"https://www.facebook.com/burythehatchetkc/","smfieldid":7,"smserviceid":4},{"fieldname":"URL","value":"https://www.yelp.com/biz/bury-the-hatchet-kc-overland-park","smfieldid":8,"smserviceid":5},{"fieldname":"URL","value":"https://www.instagram.com/axethrowingkc/?hl=en","smfieldid":7,"smserviceid":13},{"fieldname":"URL","value":"https://www.tripadvisor.com/Attraction_Review-g38969-d14176346-Reviews-Bury_the_Hatchet-Overland_Park_Kansas.html","smfieldid":11,"smserviceid":16}],"address1":"7105 W. 105th Street","hasTripAdvisor":false,"weburl":"https://burythehatchet.com/axe-throwing-kansas-city/","hasYelp":false,"amenityTree":[],"crmtracking":{"core_itinerary":"58_43933","core_booking_click":"7_43933","custom_referrals_bookdirect_lodging":"112_43933","core_map_view":"59_43933","custom_leisure_event_views":"126_43933","core_listing_view":"1_43933","core_mobile_view":"17_43933","custom_threshold_360_views":"120_43933","custom_instagram_views":"114_43933","custom_visitapps_listing_view":"111_43933","custom_referrals_bandwango":"124_43933","custom_referrals_bookdirect_activities":"113_43933","core_twitter_view":"12_43933","custom_leisure_event_click_thrus":"127_43933","core_mobile_click":"16_43933","custom_referrals_ticketmaster":"123_43933","custom_core_placeholder":"125_43933","core_listing_click":"4_43933","custom_visitapps_passport_check_in":"110_43933","custom_ticketed_event_referrals":"122_43933","custom_instagram_click_thrus":"115_43933","core_facebook_view":"14_43933","custom_youtube_click_thrus":"117_43933","core_mobile_call":"18_43933","core_facebook_click":"15_43933","custom_youtube_views":"116_43933","custom_referrals_viator":"121_43933","custom_pinterest_views":"118_43933","custom_pinterest_click_thrus":"119_43933","core_twitter_click":"13_43933"}};
var cityStateZip = "Overland Park, KS 66212";
var streetAddress = "7105 W. 105th Street";
var locations;
if (streetAddress !== undefined && streetAddress !== '') {
var location = {
streetAddress: streetAddress,
cityStateZip: cityStateZip
}
locations = [location];
}
var weburl, rawWeburl;
if (data.weburl) {
weburl = "/plugins/crm/count/?type=server&key=4_43933&val=112f2b83eea3e27728a43b18e63a936c17e6a91ab9a492e615fdaa3595b5917b814470786133333e6fc0e56b221fb6bb74102ec5e3da9bc66744eea4a1665c965b4cb955035ffbe986f242fbab763b64b1759f08540ed284148f1fc99a39c44e";
rawWeburl = data.weburl;
}
var tripbuilderTracking = "58_43933";
var translations = JSON.parse($("#translations_be71314a-563f-4461-bfd4-caff6b68f1ac").html());
var hoursOfOperation = [];
data.amenityTree.forEach(function(amenity) {
amenity.groups.forEach(function(group) {
group.fields.forEach(function(field) {
if (field.tabshortname === 'hoursofoperation') {
hoursOfOperation.push(field.doc)
}
});
});
});
var socialMap = {
"serviceid_4" : { class : "fab fa-facebook-f", service : "facebook" },
"serviceid_1" : { class : "fab fa-x-twitter", service : "twitter" },
"serviceid_2" : { class : "fab fa-youtube", service : "youtube" },
"serviceid_10" : { class : "fab fa-linkedin", service : "linkedin" },
"serviceid_12" : { class : "fab fa-pinterest", service : "pinterest" },
"serviceid_13" : { class : "fab fa-instagram", service : "instagram" },
"serviceid_17" : { class : "fab fa-snapchat", service : "snapchat" },
"serviceid_5" : { class : "fab fa-yelp", service : "yelp" },
"serviceid_16" : { class : "fab fa-tripadvisor", service : "tripadvisor" }
};
var social = [];
var openTable = false;
if (data.social) {
data.social.forEach(function(val) {
var item = socialMap['serviceid_' + val.smserviceid];
if (item === undefined) { return; }
item.url = listingsLib.getValidSocialUrl({ url : val.value, urlType : item.service });
item.rawUrl = listingsLib.getValidSocialUrl({ url : val.value, urlType : item.service });
if (item.service === 'twitter') {
item.url = sv_crmLib.getTrackUrl(data.crmtracking.core_twitter_click, item.url);
} else if (item.service === 'facebook') {
item.url = sv_crmLib.getTrackUrl(data.crmtracking.core_facebook_click, item.url);
}
social.push(item);
});
openTable = data.social.filter(item => item.smserviceid === 6).length
? data.social.filter(item => item.smserviceid === 6)[0].value
: false;
}
var placemarks = [];
if (data.latitude) {
placemarks.push({
recid : data.recid,
title : data.title,
latitude : data.latitude,
longitude : data.longitude,
address1 : streetAddress,
crmc : data.primaryCategory.catname,
crmsc : data.primaryCategory.subcatname,
itemType : 'listings',
itemName : data.title,
city : data.city,
region : data.region,
acctid : data.acctid,
rankname : data.rankname,
});
}
var vue = detail.getVue({
data : {
type : 'Listings',
title : data.title,
crmc : data.primaryCategory.catname,
crmsc : data.primaryCategory.subcatname,
rawWeburl : rawWeburl,
acctid : data.acctid,
city : data.city,
region : data.region,
rankname : data.rankname,
udfs : data.udfs,
locations : locations,
phone : data.phone,
tollfree : data.tollfree,
media : data.media,
email : data.email,
weburl : weburl,
social : social,
hasTripAdvisor : data.hasTripAdvisor,
tripbuilder : tripbuilder,
tripbuilderTracking : tripbuilderTracking,
yelp : data.yelp,
hasYelp : data.hasYelp,
openTable : openTable,
yelpHours : data.yelp ? data.yelp.hours : undefined,
hoursOfOperation: hoursOfOperation,
threshold360id : data.threshold360id,
recid : data.recid,
isDTN : data.isDTN,
description : data.description,
offers : data.offers,
events : data.events,
placemarks : placemarks,
amenities : data.amenityTree,
meetingfacility : data.meetingfacility,
meetingrooms : data.meetingrooms,
translations : translations,
latitude: data.latitude,
longitude: data.longitude,
gtmVars : '{ "tClient_ga4" : {"interactionSource" : "detail"} }',
hasHeritage : data.accountudfs && data.accountudfs[403] && data.accountudfs[403].value ? true : undefined,
hasScenic : data.accountudfs && data.accountudfs[404] && data.accountudfs[404].value ? true : undefined,
hasByways : data.accountudfs && data.accountudfs[405] && data.accountudfs[405].value ? true : undefined,
hasAgritourism : data.accountudfs && data.accountudfs[406] && data.accountudfs[406].value ? true : undefined,
},
templates : {
listing_ta_snippet : listing_ta_snippet,
listing_detail_meeting_facilities : listing_detail_meeting_facilities,
listing_detail_meeting_room : listing_detail_meeting_room,
yelp_component : yelp_component,
event_item_template : event_item_template,
offer_item_template : offer_item_template,
custom_li_items : custom_li_items,
},
rootNode : $('[data-guid="be71314a-563f-4461-bfd4-caff6b68f1ac"]')
});
sv_crmLib.trackAjax(data.crmtracking.core_listing_view);
/* register available UI events for SEM tracking */
var watcher = new UIWatcher(vue, $, document);
var uid = clientLib.uuid().toString();
var widgetEvents = ["item-click"];
for (var i=0; i