javascript - Adwords Conversion Tracking in PHP Form -
i have html page contact form. if fills form, see "thanks" message on same page. html code page is
<form id="contact" method="post" action="demo"> <div class="row-fluid"> <div class="span6"> <input type="text" required placeholder="first name" name="firstname" /> </div> <div class="span6"> <input type="text" required placeholder="last name" name="lastname" /> </div> </div> <div class="row-fluid"> <div class="span6"> <input type="email" required placeholder=" * email" name="email" /> </div> <div class="span6"> <input type="text" required placeholder="country" name="country" /> </div> </div> <div class="row-fluid"> <div class="span6"> <textarea name="comment" required placeholder="comment" size="100%"></textarea> </div> </div> <div class="row4"> <input type="submit" data-loading-text="loading..." class="btn button animated bouncein" value="request information"> </div> </form>
and php code is
if ($email=="") { echo "<div class='alert alert-error'> <a class='close' data-dismiss='alert'>×</a> <strong>warning!</strong> please enter email. </div> "; } elseif ($firstname=="" or $lastname=="" or $country=="") { echo "<div class='alert alert-error'> <a class='close' data-dismiss='alert'>×</a> <strong>warning!</strong> please fill fields. </div>"; } else{ mail($to, $subject, $msg, "from: $_request[email]"); echo "<div class='alert alert-success'> <a class='close' data-dismiss='alert'>×</a> <strong>thank message!</strong> </div> "; }
now integrate google adwords conversion code contact form. please assist me on this? here conversion code:
<script type="text/javascript"> /* <![cdata[ */ var google_conversion_id = 955016975; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "_3sscjznivwqj86xxwm"; 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/955016975/?label=_3sscjznivwqj86xxwm&guid=on&script=0"/> </div> </noscript>
Comments
Post a Comment