{"id":8339144,"date":"2016-10-21T14:52:48","date_gmt":"2016-10-21T14:52:48","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/fatal-error-with-javascript-code-inserted\/"},"modified":"2016-10-21T15:08:45","modified_gmt":"2016-10-21T15:08:45","slug":"fatal-error-with-javascript-code-inserted","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/fatal-error-with-javascript-code-inserted\/","title":{"rendered":"Fatal Error with javascript code inserted"},"content":{"rendered":"<p>Hello,<br \/>\nMy client&#8217;s site is http:\/\/texasbariatricspecialists.com\/.  I have a custom link in the top right button called eStore. I need to add Google Analytics tracking for clicks from that button. I have your plugin installed. When I input the following javascript into the javascript box for that button, I get an error as soon as I go to the website.<\/p>\n<p>code I am using in the javascript box:<br \/>\n_gaq.push([&#8216;_trackEvent&#8217;, &#8216;Click&#8217;, &#8216;ThisButton&#8217;, &#8216;Yes\u2019]);<br \/>\nwindow.location =&#8221;https:\/\/www1.bariatricadvantage.com\/service\/referrerCode?referrer=TBS&#8221;<\/p>\n<p>Error that is on the top of the page with that script in place:<br \/>\nFatal error: Call to undefined function iconv() in \/home\/tbs001\/public_html\/wp-content\/plugins\/jin-menu\/jinmenu.php on line 72<\/p>\n<p>If I remove the javascript from the box, the error goes away.<\/p>\n<p>What am I doing wrong?  Also since I installed the plugin I removed the Google Analytics code from the header.php file.<\/p>\n<p>Thanks!<br \/>\nGreg McComish<\/p>\n","protected":false},"template":"","class_list":["post-8339144","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8339144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8339144\/revisions"}],"predecessor-version":[{"id":8339221,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8339144\/revisions\/8339221"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=8339144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}