Skip to content

Instantly share code, notes, and snippets.

package uk.co.diffa.cq.qrcode;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
*
<%--
Place this file in /apps/foundation/components/page/ to use the new Google Analytics async
tracking code as described here:
http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html
--%>
<%@page session="false"%>
%><script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '<%= request.getAttribute("analyticsSnippet") %>']);
_gaq.push(['_trackPageview']);
<%@include file="/libs/wcm/global.jsp" %><%
%><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="keywords" content="<%= WCMUtils.getKeywords(currentPage) %>">
<cq:include script="/libs/wcm/init/init.jsp"/>
<% currentDesign.writeCssIncludes(out); %>
<title><%= currentPage.getTitle() == null ? currentPage.getName() : currentPage.getTitle() %></title>
<%-- The queue of page events described here -->
<cq:include script="/apps/foundation/components/analytics.google.queue.jsp"/>
</head>
<%--
Place this file in /apps/foundation/components/page to use the new Google Analytics async
tracking code as described here:
http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html
--%>
<%@page session="false"%>
<script type="text/javascript">
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';