Skip to content

Instantly share code, notes, and snippets.

@morsdyce
Created April 9, 2012 10:53
Show Gist options
  • Save morsdyce/2342841 to your computer and use it in GitHub Desktop.
Save morsdyce/2342841 to your computer and use it in GitHub Desktop.
Milstone Leadmachine Implemenation
<!--
add the leadmachine javascript to ALL pages on the site (so it can track cookies across the entire site)
<script type="text/javascript" src="http://operad.net/lm.js?lang=en">
// Operad LeadMachine tracker.
</script>
-->
<!--
Inside the form you need to change the action attribute to:
http://operad.net/lead/input/17
Add the following to the form tag:
accept-charset="utf-8" class="LM_form" id="LM_form"
-->
<form id="aspnetForm" onsubmit="javascript:return WebForm_OnSubmit();" action="contact.aspx" method="post" name="aspnetForm">
<div>
<input type="hidden" value="" id="__EVENTTARGET" name="__EVENTTARGET">
<input type="hidden" value="" id="__EVENTARGUMENT" name="__EVENTARGUMENT">
<input type="hidden" value="/wEPDwULLTIwMjQ0NjkzNzhkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBRZjdGwwMCRjcGhQb3B1cCRidG5TZW5k" id="__VIEWSTATE" name="__VIEWSTATE">
</div>
<div>
<input type="hidden" value="/wEWBgKao4fIDQKyo5vKAQLfmKeLDwL/2pfZDgK3s8f1CALS0+CxCQ==" id="__EVENTVALIDATION" name="__EVENTVALIDATION">
</div>
<div dir="rtl">
<div class="contact">
<div class="fields">
<!-- change the name attribute of the name field to: lead_first_name, change id element to: lead_first_name -->
<div class="item"><input type="text" id="ctl00_cphPopup_txtName" name="ctl00$cphPopup$txtName"></div>
<!-- change the name attribute of the telephone field to: lead_phone, change id element to: lead_phone -->
<div class="item"><input type="text" dir="ltr" id="ctl00_cphPopup_txtTel" name="ctl00$cphPopup$txtTel"></div>
<!-- change the name attribute of the email field to: lead_email, change id element to: lead_email -->
<div class="item"><input type="text" dir="ltr" id="ctl00_cphPopup_txtEmail" name="ctl00$cphPopup$txtEmail"></div>
<!-- change the name attribute of the email field to: lead_comment, change id element to: lead_comment -->
<div class="item2"><textarea type="text" id="ctl00_cphPopup_txtDetails" name="ctl00$cphPopup$txtDetails"></textarea></div>
<!-- Remove onclick javascript, change name atribute to submit -->
<div class="btn"><input type="image" style="border-width:0px;" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$cphPopup$btnSend&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" src="img/send.jpg" id="ctl00_cphPopup_btnSend" name="ctl00$cphPopup$btnSend"></div>
</div>
<div class="close"><a href="javascript:window.close();"><img src="img/contact_new_12.jpg"></a></div>
<span style="color:Red;display:none;" id="ctl00_cphPopup_req1"></span>
<div style="color:Red;display:none;" class="vsummary" id="ctl00_cphPopup_ValidationSummary1">
</div>
</div>
</div>
<!-- add the following code before the end of the form -->
<!-- LM HIDDEN FIELDS START -->
<input id="lead_adgroup" type="hidden" name="lead_adgroup" value="" />
<input id="lead_medium" type="hidden" name="lead_medium" value="" />
<input id="lead_search_query" type="hidden" name="lead_search_query" value="" />
<input id="lead_page_name" type="hidden" name="lead_page_name" value="" />
<input id="lead_referal" type="hidden" name="lead_referal" value="" />
<input id="lead_user_agent" type="hidden" name="lead_user_agent" value="" />
<input id="lead_browserstate" type="hidden" name="lead_browserstate" value="{'cookie':'off','js':'off'}" />
<input id="lead_thankyou_url" type="hidden" name="lead_thankyou_url" value="" />
<input name="iehack" type="hidden" value="&#9760;" />
<!-- LM HIDDEN FIELDS END -->
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment