title: Magento 1 - add inline javascript to product page via layout update xml code
body: <p>Hi i want to use google analytics's AB-Testing engine. Therefore i have to add a javascript-snippet to single product pages.</p>
  
  <p>My intend was to add it in the description or short-description. It is working, but it is insufficient, because the script makes a redirect, which means the page loads half and then is redirected. </p>
  
  <p>Google says i should add the script in the head-tag. Is it possible to insert the script as "custom layout update" here:
  <img src="https://i.stack.imgur.com/pDrh1.png" alt="enter image description here"> </p>
  
  <p>i could imagine something like</p>
  
  <pre><code>&lt;default translate="label" module="page"&gt;
          &lt;label&gt;All Pages&lt;/label&gt;
          &lt;block type="page/html" name="root" output="toHtml" template="page/3columns.phtml"&gt;
              &lt;block type="page/html_head" name="head" as="head"&gt;
                  &lt;action method="addJs"&gt;&lt;script&gt;alert('hello')&lt;/script&gt;&lt;/action&gt;
              &lt;/block&gt;
          &lt;/block&gt;
  &lt;/default&gt;
  </code></pre>