<?php
/**
* Template Name: Thank you page
*/
get_header(); ?>
<section class="thanks-section bg-vehicles">
  <h1>Thank You!</h1>
  <p>An Agent will be contacting your shortly regarding your inquiry. <br>
  While you're waiting, <a href="<?= get_site_url(); ?>/used-cars-for-sale">browse our vehicle inventory</a> or ...</p>
  <div class="thanks-promo">
    <h2>Earn Upto <strong>$150</strong> working with MVP.</h2>
    <p>If you have a <strong>friend, relative or co-worker</strong> who has had trouble obtaining auto financing, <strong>tell them about MVPNS!</strong> If they end up purchasing or leasing a vehicle through us after you referred them, <strong>we’ll give you $150</strong> to show our appreciation.</p>
    <p>Just fill out the <strong><a href="<?= get_site_url(); ?>/referral-program">Referral Form</a></strong>. Don’t worry – we won’t hassle them…  We’ll simply make a follow-up call to your referral and offer to assist with their vehicle purchase. </p>
    <a href="<?= get_site_url(); ?>/referral-program" class="button">Click here to refer a friend!</a>
  </div>
  <p>Not interested? No problem! You can...</p>
  <ul class="links">
    <li><a href="<?= get_site_url(); ?>">Return to the homepage</a>
    <li><a href="https://www.facebook.com/maritimevehicleproviders/" target="_blank">See our special offers on Facebook</a>    
    <li><a href="https://www.instagram.com/maritimevehicleproviders/" target="_blank">View all our success stories on Instagram</a>    
  </ul>
</section>
<?php get_footer(); ?>

<!-- Google Code for Finance Application Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */ var google_conversion_id = 833874793; var google_conversion_label = "qxRkCKGOtnUQ6dbPjQM"; var google_remarketing_only = false; /* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/833874793/?label=qxRkCKGOtnUQ6dbPjQM&amp;guid=ON&amp;script=0"/></div>
</noscript>
<script>

jQuery(document).ready(function(){
dataLayer.push({
 event: "user_form_submission",
 form_name: "<?php echo $_REQUEST['form_name'];?>",
 user_data: {
   user_id: "<?php echo time();?>", // Unique User ID
   phone_number: "<?php echo $_REQUEST['phone'];?>",
   email_address: "<?php echo $_REQUEST['email'];?>",
   address: {
     postal_code: '<?php echo @$_REQUEST['postal-code'];?>',
     first_name: '<?php echo $_REQUEST['first-name'];?>',
     last_name: '<?php echo $_REQUEST['last-name'];?>',
     street: '<?php echo @$_REQUEST['address'];?>',
     country: 'Canada',
     city: '<?php echo @$_REQUEST['city'];?>'
   }
 }
});
console.log(dataLayer);
});

</script>