Commit e6dcbafa authored by Geoff Simmons's avatar Geoff Simmons

Mock vertical & VCL now generate data as expected by the processor:

countername, ot_PageCluster and ot_vid
parent 2d309ed0
...@@ -42,6 +42,9 @@ public class Data { ...@@ -42,6 +42,9 @@ public class Data {
private static final String engines[] = {"Google", "Bing", "Yahoo"}; private static final String engines[] = {"Google", "Bing", "Yahoo"};
private static final String types[] = {"order", "category", "search",
"product", "user", "service"};
private Random rand = new Random(); private Random rand = new Random();
public Data() { public Data() {
...@@ -90,4 +93,8 @@ public class Data { ...@@ -90,4 +93,8 @@ public class Data {
public String getSearchEngine() { public String getSearchEngine() {
return engines[rand.nextInt(engines.length)]; return engines[rand.nextInt(engines.length)];
} }
public String getPageCluster() {
return types[rand.nextInt(types.length)];
}
} }
<%@page import="java.net.URI"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> "http://www.w3.org/TR/html4/strict.dtd">
...@@ -23,6 +24,10 @@ from there by the tracking reader. Its functions are:</p> ...@@ -23,6 +24,10 @@ from there by the tracking reader. Its functions are:</p>
<p>The outer page simulates generation of data presumably obtained from <p>The outer page simulates generation of data presumably obtained from
JavaScript, and includes the next page.</p> JavaScript, and includes the next page.</p>
<esi:include src="/ts-rcv?countername=<%=(new URI(request.getRequestURI())).getPath()%>"/>
<esi:include src="/ts-rcv?ot_PageCluster=<jsp:getProperty name="d" property="pageCluster"/>"/>
<esi:include src="/ts-rcv?ot_browinw=<%=d.nextInt(1200)%>&ot_browinh=<%=d.nextInt(1200)%>"/> <esi:include src="/ts-rcv?ot_browinw=<%=d.nextInt(1200)%>&ot_browinh=<%=d.nextInt(1200)%>"/>
<esi:include src="/ts-rcv?ot_dispres=<%=d.nextInt(1920)%>x<%=d.nextInt(1080)%>"/> <esi:include src="/ts-rcv?ot_dispres=<%=d.nextInt(1920)%>x<%=d.nextInt(1080)%>"/>
......
...@@ -23,7 +23,7 @@ sub vcl_recv { ...@@ -23,7 +23,7 @@ sub vcl_recv {
set req.http.X-VID = regsub(req.http.Cookie, set req.http.X-VID = regsub(req.http.Cookie,
"^.*\bVisitorID\s*=(\S+)\b.*$", "^.*\bVisitorID\s*=(\S+)\b.*$",
"\1"); "\1");
std.log("track " + req.xid + " ot_Vid=" + std.log("track " + req.xid + " ot_vid=" +
req.http.X-VID + "&me_vid=" + req.http.X-VID + req.http.X-VID + "&me_vid=" + req.http.X-VID +
"&ot_NewVid=false&me_vid=false"); "&ot_NewVid=false&me_vid=false");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment