Hi all, I am trying to simply call a onClick function on a button and facing this error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING in /home/test/html/home.php on line 121
My button html code is:
<button onclick="_gaq.push(['_trackEvent', 'category', 'action', 'opt_label', 1]);"></button>
In this line this error is coming.
I don’t know what is happening I am calling _gaq.push on onclick event and this unexpected error is coming, Please give me solution for the same.