Google Analytics 请问怎么加入到JSP页面中来
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol ) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-易做图ytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-xxxxx-x");
pageTracker._trackPageview();
pageTracker._addTrans(
"1234", // order ID - required
"Womens Apparel", // affiliation or store name
"11.99", // total - required
"1.29", // tax
"15.00", // shipping
"San Jose", // city
"California", // state or province
"USA" // country
);
// add item might be called for every item in the shopping cart
// where your ecommerce engine loops through each item in the cart and
// prints out _addItem for each
pageTracker._addItem(
"1234", // order ID - necessary to associate item with transaction
"DD44", // SKU/code - required
"T-Shirt", // product name
"Olive Medium", // category or variation
"11.99", // unit price - required
"1" // quantity - required
);
pageTracker._trackTrans(); //submits transaction to the Analytics servers
} catch(err) {}
</script>
把这段代码copy到页面中,不知道怎么调用
补充:Java , Java EE