title: Google Analytics Event Tracking through onclick button
body: <p>I want to track on how many people is clicking the button and sessions will be collected in Google Analytics. However, the I cannot get any result in Google Analytics Events. 
  My code is below: </p>
  
  <pre><code>&lt;script&gt;
            function handleOutboundLinkClicks(event) {
    ga('send', 'event', {
      eventCategory: 'Outbound Link',
      eventAction: 'click',
      eventLabel: event.target.href,
      transport: 'beacon'
    });
  }
  
        &lt;/script&gt;
  </code></pre>
  
  <p>////
  The code for my button is below: </p>
  
  <pre><code>&lt;input type="submit" id="submit" value="Validate and Submit" onclick=”_gaq.push([‘_trackEvent’, ‘form, ‘submit’, ’order sent’, 10]);”/&gt;  
  </code></pre>
  
  <p>Then entire code for this page:</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;Keepsake Florals&lt;/title&gt;
      &lt;!--link to external css file--&gt;
  
  &lt;link rel="stylesheet" type="text/css" href="keepsakeflorals.css"/&gt;
  &lt;link rel="stylesheet" type="text/css" href="ksform.css" /&gt;
  &lt;link rel="shortcut icon" href="favicon.ico" /&gt;
     &lt;script src="scripts/jquery-1.11.3.min.js"&gt;&lt;/script&gt;
  
  
  
  
        &lt;script&gt;
  
        function handleOutboundLinkClicks(event) {
    ga('send', 'event', {
      eventCategory: 'Outbound Link',
      eventAction: 'click',
      eventLabel: event.target.href,
      transport: 'beacon'
    });
  }
  
        &lt;/script&gt;
  
  
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="box"&gt;
  &lt;h1&gt;&lt;a href="index.html" title="click here to return home"&gt; KEEPSAKE FLORALS &lt;/a&gt; &lt;/h1&gt;
  &lt;/div&gt;
  
  &lt;div&gt;
  &lt;nav id="mainnav"&gt; 
  &lt;a href="index.html"&gt; Home&lt;/a&gt; |
  &lt;a href="aboutus.html"&gt; About Us  &lt;/a&gt; |
  &lt;a href="flowers.html"&gt; Flowers &lt;/a&gt; |
  &lt;a href="order.html"&gt; Order &lt;/a&gt; |
  &lt;a href="review.html"&gt; Review &lt;/a&gt; |
  &lt;/nav&gt;
  &lt;/div&gt;
  
  
  
  &lt;form action="thankyou.html" id="contact-form"&gt;
  
    &lt;fieldset id="contactinfo"&gt;
    &lt;legend&gt; &lt;span&gt; Contact Information &lt;/span&gt; &lt;/legend&gt;
      &lt;label&gt; 
      Name
      &lt;input type="text" name="name" id="nameinput" placeholder="First and last name"  /&gt;
      &lt;/label&gt;
        &lt;label&gt;
        Email
        &lt;input type="email" name="email" id="emailinput" placeholder="address@example.com" /&gt;
        &lt;/label&gt;
        &lt;label&gt;
        Phone
        &lt;input type="text" name="phone" id="phoneinput" placeholder="phone number" /&gt;
        &lt;/label&gt;
  
       &lt;/fieldset&gt;
  
          &lt;fieldset id="orderflower"&gt;
            &lt;legend&gt; &lt;span&gt; Flowers to order &lt;/span&gt; &lt;/legend&gt; 
            &lt;label for="mother" &gt;
               &lt;input type="radio" name="flower" id="mother" value="mother" checked="checked"  /&gt;
               Mother's day flower 
               &lt;/label&gt;
                   &lt;label for="father"&gt;
                           &lt;input type="radio" name="flower" id="father" value="father" /&gt;
                          Fathers day flower
               &lt;/label&gt;
                       &lt;label for="otheroccasion"&gt;
                      &lt;input type="radio" name="flower" id="occasion" value="occasion"  /&gt;
                      Other occasion flower
                              &lt;/label&gt;
  
               &lt;label for="valentinesday"&gt;
                   &lt;input type="radio" name="flower" id="vday" value="vday" /&gt;
                    Valentine's Day
                    &lt;/label&gt;
  
               &lt;label for="others"&gt;
                  &lt;input type="radio" name="flower" id="others" value="others"  /&gt;
                    Others
  
                    &lt;input type="text" name="other" id="otherinput"&gt;
                    &lt;/label&gt;    
                &lt;/fieldset&gt;
            &lt;fieldset id="delivery"&gt;
            &lt;legend&gt; &lt;span&gt; How to contact you ? &lt;/span&gt; &lt;/legend&gt;
            &lt;label for "question"&gt;
                &lt;input type="radio" name="flower" id="phone"  /&gt;
                   Via my handphone number
                   &lt;/label&gt;
                    &lt;label for "question"&gt;
                &lt;input type="radio" name="flower" id="email"  /&gt;
                   Via my email
                   &lt;/label&gt;
  
  
            &lt;/fieldset&gt;
            &lt;fieldset id="helpneeded" &gt;
  
            &lt;legend&gt; &lt;span&gt; Any help needed? &lt;/span&gt; &lt;/legend&gt; 
            &lt;textarea id="helpneeded" name="helpneeded" rows="4" cols="20"&gt; &lt;/textarea&gt;
            &lt;/fieldset&gt;    
             &lt;input type="submit" id="submit" value="Validate and Submit" onclick=”ga('send', 'event', 'form', 'submit', 'order sent', 10);”/&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>