Advertisement
Guest User

Waverley

a guest
Dec 17th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(window).load(function() {
  2.     $('input[value="Book a Test Drive"]').click(function() {
  3.         utag.link({
  4.             "car.ModelName": $('div#bookTestDrive .chosen-single').eq(0).text(),
  5.             "event.Action": "Submit",
  6.             "event.Category": "Form",
  7.             "event.Label": "Testdrive Enquiry",
  8.             "event.Name": "goal_book_testdrive",
  9.             "event.NonInteraction": "0",
  10.             "partner.InformationLocation": "Waverley",
  11.             "partner.InformationName": "Waverley Volkswagen"
  12.         });
  13.     });
  14.     $('span.phone,a[href="tel:0395505800"]').click(function() {
  15.         utag.link({
  16.             "event.Action": "Click",
  17.             "event.Category": "Call",
  18.             "event.Label": "03 9550 5800",
  19.             "event.Name": "goal_clicktocall",
  20.             "event.NonInteraction": "0",
  21.             "partner.InformationLocation": "Waverley",
  22.             "partner.InformationName": "Waverley Volkswagen"
  23.         });
  24.     });
  25.     $('form.value-my-car  input[type=submit]').click(function() {
  26.         utag.link({
  27.             "event.Action": "Submit",
  28.             "event.Category": "Form",
  29.             "event.Label": "Trade in Value  Enquiry",
  30.             "event.Name": "goal_contact_enquiry",
  31.             "event.NonInteraction": "0",
  32.             "partner.InformationLocation": "Waverley",
  33.             "partner.InformationName": "Waverley Volkswagen"
  34.         });
  35.     });
  36.     $('form#formPartsEnquiry button[type=submit]').click(function() {
  37.         utag.link({
  38.             "event.Action": "Submit",
  39.             "event.Category": "Form",
  40.             "event.Label": "Parts Enquiry",
  41.             "event.Name": "goal_contact_enquiry",
  42.             "event.NonInteraction": "0",
  43.             "partner.InformationLocation": "Waverley",
  44.             "partner.InformationName": "Waverley Volkswagen"
  45.         });
  46.     });
  47.     $('div#financeEnquiry input[type=submit]').click(function() {
  48.         utag.link({
  49.             "event.Action": "Submit",
  50.             "event.Category": "Form",
  51.             "event.Label": "Finance Enquiry",
  52.             "event.Name": "goal_contact_enquiry",
  53.             "event.NonInteraction": "0",
  54.             "partner.InformationLocation": "Waverley",
  55.             "partner.InformationName": "Waverley Volkswagen"
  56.         });
  57.     });
  58.     $('div#contact-form-section input[type=submit]').click(function() {
  59.         utag.link({
  60.             "event.Action": "Submit",
  61.             "event.Category": "Form",
  62.             "event.Label": "Contact Enquiry",
  63.             "event.Name": "goal_contact_enquiry",
  64.             "event.NonInteraction": "0",
  65.             "partner.InformationLocation": "Waverley",
  66.             "partner.InformationName": "Waverley Volkswagen"
  67.         });
  68.     });
  69.     if (document.location.href.includes('/vehicles/')) {
  70.         $('a[data-reveal-ajax]').eq(0).click(function() {
  71.             utag.link({
  72.                 "car.CarlineName": [$('.bread-crumbs').text().split('/')[3].trim()],
  73.                 "event.Action": "Download",
  74.                 "event.Category": "Brochure",
  75.                 "event.Label": "Form",
  76.                 "event.Name": "goal_download_brochure",
  77.                 "event.NonInteraction": "0",
  78.                 "partner.InformationLocation": "Waverley",
  79.                 "partner.InformationName": "Waverley Volkswagen"
  80.             });
  81.         });
  82.     };
  83.     $('a').click(function() {
  84.         utag.link({
  85.             "event.Action": "Click",
  86.             "event.Category": "TextLinkClick",
  87.             "event.Label": $(this).attr('href'),
  88.             "event.Name": "general_TextLink_click",
  89.             "event.NonInteraction": "0"
  90.         });
  91.     });
  92.     $('form[name=search_form] button#vse-search-btn').click(function() {
  93.         utag.link({
  94.             "event.Action": "Click",
  95.             "event.Category": "Car Search",
  96.             "event.Label": $(this).text().length !== 0 ? $(this).text() : $(this).val(),
  97.             "event.Name": "general_Event_search",
  98.             "event.NonInteraction": "0"
  99.         });
  100.     });
  101.     $('button,input[type=button]').click(function() {
  102.         utag.link({
  103.             "event.Action": "Click",
  104.             "event.Category": "Button",
  105.             "event.Label": $(this).text().length !== 0 ? $(this).text() : $(this).val(),
  106.             "event.Name": "general_Event_buttonclick",
  107.             "event.NonInteraction": "0"
  108.         });
  109.     });
  110.     $('form input[type=submit]').click(function() {
  111.         utag.link({
  112.             "event.Action": "Submit",
  113.             "event.Category": "Form",
  114.             "event.Label": $(this).val(),
  115.             "event.Name": "general_Event_formsubmit",
  116.             "event.NonInteraction": "0",
  117.             "partner.InformationLocation": "Waverley",
  118.             "partner.InformationName": "Waverley Volkswagen"
  119.         });
  120.     });
  121. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement