I am using Google analytics to track an event when a button is clicked. Please find below my piece of code responsible for that.
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '@accountNumber']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<button id="button-submit" onclick="_gaq.push(['_trackEvent', 'CoreSiteCulture UK Submit', 'US Home', 'example.com']);">Save</button>
The the events are sent but they do not appear in Google Analytics events.
Does anyone knows what might be wrong?
EDIT: I am using the GA Debugger for debugging and it says Tracking beacon sent.