title: Adding validation in fb pixel code onclick event
body: <p>I have a pixel code that submit a report in a submit button form and how can I add some validation to prevent the code from firing if the form fields are empty?</p>
  
  <p>Here's the code</p>
  
  <pre><code>&lt;input onClick="ga('send', 'event', 'Leaderboard Challenge', 'Submit - Step 3'); fbq('track', '&lt;LEADERBOARD_COMPETITION&gt;');" class="main-button f-right" type="submit" value="SUBMIT" id="submitBtn" name="submitBtn"&gt;
  </code></pre>