How do insert the plugin code to create an event to fire in Google Analytics whenever someone uses our Facebook chat plugin that is on our website? enter image description here

  • Your screenshot is from creating a "goal" based on events. You can't create events on that form. – Stephen Ostermiller May 30 at 9:36
  • Well that makes sense. My question should have been how to turn a click to a button that runs a script into an event. If my script is the attached screenshot would I use something like this within that script to create an event? <button onclick="ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);">Example Button Text</button> – Juie Perry May 30 at 14:28
  • I removed some characters because it was too long. <!-- Load for JavaScript --> <div id="fb-root"></div> <script>window.fbAsyncInit = function() { FB.init({xfbm: true, version : 'v3.3' }); }; (function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = 'connect.facebook.net/en_US/sdk/xfbml.cc.js'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'fb-jssdk'));</script> <!-- Your cc code --> <div class="fb-cc" attribution=setup_tool page_id=""> </div> – Juie Perry May 30 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.