Skip to content

Instantly share code, notes, and snippets.

@tomfuertes
Created July 25, 2012 18:24
Show Gist options
  • Select an option

  • Save tomfuertes/3177703 to your computer and use it in GitHub Desktop.

Select an option

Save tomfuertes/3177703 to your computer and use it in GitHub Desktop.
AnalyticsDataLayer Updates | Calendar
<!-- Starting on line line 764 of /haoi/611.1009820.1291204/calendar/year.html -->
<div id="analyticsData" data-analytics-appEnvironment="stage" data-analytics-brand="HolidayRentals"
data-analytics-viewName="&#x2f;calendar&#x2f;year" data-analytics-detailTypeSingular=""
data-analytics-userID="7977cf4c858c46f4b84edcb3fa204d56" data-analytics-propID=""
data-analytics-listingID="" data-analytics-reservationID="" data-analytics-calendarID=""
data-analytics-isNewReservation="" data-analytics-listingAction="" data-analytics-UMS-GUID=""
data-analytics-purchaseID="" data-analytics-productName="" data-analytics-productQuantity=""
data-analytics-productPrice="" data-analytics-inquiryId="" data-analytics-pageType=""
data-analytics-pageName="" data-analytics-visitorType="owner" data-analytics-testing=""
data-analytics-ppc="">&nbsp;</div>
<script type="text/javascript">
var ad = $('#analyticsData');
var analyticsdatalayer = {
'appenvironment': $(ad).data('analyticsAppenvironment'),
'brand': $(ad).data('analyticsBrand'),
'viewname': $(ad).data('analyticsViewname'),
'detailtypesingular': $(ad).data('analyticsDetailtypesingular'),
'userid': $(ad).data('analyticsUserid'),
'propertyid': $(ad).data('analyticsPropid'),
'listingid': $(ad).data('analyticsListingid'),
'reservationid': $(ad).data('analyticsReservationid'),
'calendarid': $(ad).data('analyticsCalendarid'),
'isnewreservation': $(ad).data('analyticsIsnewreservation'),
'listingaction': $(ad).data('analyticsListingaction'),
'guid': $(ad).data('analyticsUms-guid'),
'orderid': $(ad).data('analyticsPurchaseid'),
'productname': $(ad).data('analyticsProductname'),
'productquantity': $(ad).data('analyticsProductquantity'),
'productprice': $(ad).data('analyticsProductprice'),
'inquiryid': $(ad).data('analyticsInquiryid'),
'pagetype': $(ad).data('analyticsPagetype'),
'pagename': $(ad).data('analyticsPagename'),
'visitortype': $(ad).data('analyticsVisitortype'),
'testing': $(ad).data('analyticsTesting'),
'ppc': $(ad).data('analyticsPpc')
}
function analyticsGetPageNameAndType() {
if (typeof (payload) != 'undefined') {
analyticsdatalayer.pagetype = payload.channel;
analyticsdatalayer.pagename = payload.pageName;
$(ad).data('analyticsPagetype', analyticsdatalayer.pagetype);
$(ad).data('analyticsPagename', analyticsdatalayer.pagename);
}
}
$(document).ready(function () {
analyticsGetPageNameAndType();
});
</script>
<script type="text/javascript">
(function () {
var s = document.getElementsByTagName('script')[0];
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = location.protocol + "//nexus.ensighten.com/homeaway/Bootstrap.js";
s.parentNode.insertBefore(e, s);
})();
</script>
<!-- .. SNIP .. -->
<!-- Line 27185 -->
var payload = {
"pageName": "owner - view calendar",
"channel": "dashboard - calendar",
"name": "calendar is up to date",
"event": "event6",
"linkTrackVars": "events,prop34,prop35,prop36,prop37,prop38,eVar24",
"linkTrackEvents": "event6",
"brandAbbr": "HolidayRentals",
"modelParams": {
"environment": "stage",
"themeName": "HolidayRentals",
"viewName": "&#x2f;calendar&#x2f;year",
"userUuid": "7977cf4c858c46f4b84edcb3fa204d56",
"propertyId": "",
"listingId": "",
"reservationId": "",
"calendarId": "",
"listingAction": ""
}
};
@tomfuertes
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment