title: Outputting JSP values into JavaScript variables
body: <p>Ok - so I have written this code to output values using JSP and set them as JS variables so I can pass them to my Google Analytics tracking code.</p>
  
  <pre><code>&lt;dsp:droplet name="/atg/dynamo/droplet/ForEach"&gt;
              &lt;dsp:param value="${CommerceItems}" name="array" /&gt;
              &lt;dsp:param name="elementName" value="CommerceItem" /&gt;
              &lt;dsp:oparam name="outputStart"&gt;var itemCatList ='&lt;/dsp:oparam&gt;
              &lt;dsp:oparam name="output"
                  &lt;dsp:getvalueof id="Category"param="CommerceItem.auxiliaryData.productRef.productWebType.productWebTypeDescription"&gt;${Category}|&lt;/dsp:getvalueof&gt;
              &lt;/dsp:oparam&gt;
              &lt;dsp:oparam name="outputEnd"&gt;'; &lt;/dsp:oparam&gt;
          &lt;/dsp:droplet&gt;
  </code></pre>
  
  <p>Im not sure if this is the correct way to go about doing this - previously the values were set to hidden inputs - then JS is used to grab those values out. I was trying to eliminate the extra code.</p>
  
  <p>Any issues with doing it this way?</p>