Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
trackrdrd
Commits
e6dcbafa
Commit
e6dcbafa
authored
Aug 21, 2012
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mock vertical & VCL now generate data as expected by the processor:
countername, ot_PageCluster and ot_vid
parent
2d309ed0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
Data.java
.../src/main/java/de/otto/lhotse/track/rdr/testapp/Data.java
+7
-0
index.jsp
rdrtestapp/src/main/webapp/index.jsp
+5
-0
track.vcl
vcl/track.vcl
+1
-1
No files found.
rdrtestapp/src/main/java/de/otto/lhotse/track/rdr/testapp/Data.java
View file @
e6dcbafa
...
...
@@ -42,6 +42,9 @@ public class Data {
private
static
final
String
engines
[]
=
{
"Google"
,
"Bing"
,
"Yahoo"
};
private
static
final
String
types
[]
=
{
"order"
,
"category"
,
"search"
,
"product"
,
"user"
,
"service"
};
private
Random
rand
=
new
Random
();
public
Data
()
{
...
...
@@ -90,4 +93,8 @@ public class Data {
public
String
getSearchEngine
()
{
return
engines
[
rand
.
nextInt
(
engines
.
length
)];
}
public
String
getPageCluster
()
{
return
types
[
rand
.
nextInt
(
types
.
length
)];
}
}
rdrtestapp/src/main/webapp/index.jsp
View file @
e6dcbafa
<%@page
import=
"java.net.URI"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
...
...
@@ -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
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_dispres=<%=d.nextInt(1920)%>x<%=d.nextInt(1080)%>"
/>
...
...
vcl/track.vcl
View file @
e6dcbafa
...
...
@@ -23,7 +23,7 @@ sub vcl_recv {
set req.http.X-VID = regsub(req.http.Cookie,
"^.*\bVisitorID\s*=(\S+)\b.*$",
"\1");
std.log("track " + req.xid + " ot_
V
id=" +
std.log("track " + req.xid + " ot_
v
id=" +
req.http.X-VID + "&me_vid=" + req.http.X-VID +
"&ot_NewVid=false&me_vid=false");
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment