Sending click events to Google Analytics in WordPress: the easy way
This is working in my WordPress site. Remember we are using the plugin “Per page head”, which allows you to add content into the section for a specific page, like custom JS or custom HTML. This is the custom code added: <script>// <![CDATA[ jQuery(document).ready(function($){ $(‘.class-name-of-the-button’).click(function() { ga(‘send’, ‘event’, { eventCategory: ‘Outbound Link’, eventAction: ‘click’, eventLabel: … Read more