title: Google Analytics event tracking code breaks wordpress site when added to functions.php
body: <p>I've added a global button via functions.php that shows on my product pages using the following code:</p>
  
  <pre><code>function add_content_after_addtocart_button_func() {
  echo '
  &lt;div class="wsbl_line"&gt;&lt;a href="http://line.me/R/msg/text/website.com" 
  title="share using Line" rel="nofollow" 
  class="wp_social_bookmarking_light_a"&gt;&lt;img src="sample-image.png" 
  width="135" height="30" class="wp_social_bookmarking_light_img"&gt;&lt;/a&gt;&lt;/div&gt;';
  }
  </code></pre>
  
  <p>Upon adding the following Google Analytics event tracking code to the above code the site breaks.</p>
  
  <pre><code>function add_content_after_addtocart_button_func() {
  echo '
  &lt;div class="wsbl_line"&gt;&lt;a href="http://line.me/R/msg/text/website.com" 
  title="share using Line" rel="nofollow" 
  class="wp_social_bookmarking_light_a" onClick="ga('send', 'event', 'social', 'line-button-click', 'line-button');"&gt;&lt;img src="sample-image.png" 
  width="135" height="30" class="wp_social_bookmarking_light_img"&gt;&lt;/a&gt;&lt;/div&gt;';
  }
  </code></pre>
  
  <p>I've successfully tested the tracking code by putting it directly in a page</p>
  
  <pre><code>&lt;a href="website.com" onClick="ga('send', 'event', 'social', 'line-button-
  click', 'line-button');"&gt;anchor text&lt;/a&gt;       
  </code></pre>
  
  <p>What am I doing wrong?</p>