php - GA Event Tracking Not Working -


can see problem code here tracking button? fixed previous post , still nothing new code:

<form id="constant-contact-signup2" action="http://www.truckingoffice.com/trucking-software-blog" method="post"> <div class="kws_input_fields"> <div class='cc_email_address kws_input_container'> <label for='cc_email_address' class=''> sign our trucking office newsletter <span class="req" title="the  sign our trucking office newsletter  field required">*</span></label> <input type='text' value='' size="30"  placeholder='john.appleseed@apple.com' name='fields[email_address][value]' class='t  required' id='cc_email_address' /> <input type="hidden" name="fields[email_address][label]" value=" sign our trucking office newsletter " /> <input type="hidden" name="fields[email_address][req]" value="1" /></div>  <input type="submit" style='position:absolute; width:0;height:0;visibility:hidden!important;' name='constant-contact-signup-submit' onclick=”_gaq.push(['_trackevent', 'button', 'click']);” /> 

privacy safesubscribe

been working on 1 week , still nothing. al appreciated!

_trackevent , _trackpageview work making tracking pixel request google servers -- running timing problem image request canceled because of request rendering new page. common solution delay form submission small amount after tracking call.

using jquery, like:

jquery(function($){   $('#constant-contact-signup2 input[type=submit]').click(function(e){     e.preventdefault();     _gaq.push(['_trackevent', 'button', 'click']);     settimeout(function(){$('#constant-contact-signup2').submit()}, 150);   }); }) 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -