-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.html
180 lines (167 loc) · 6.75 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
<!--script id="TEST-erjs" type="text/javascript">
window.onload = function(){
getCustomizeActionData();
}
function getCustomizeActionData(){
var actionAttr = document.getElementsByClassName("custom-action");
var temp_qevent = {}
for( i in actionAttr ){
temp_qevent[actionAttr[i].placeholder] = actionAttr[i].value;
}
console.log("qevent: "+temp_qevent);
}
</script-->
<script id="etu-recommender" type="text/javascript">
//var erHostname='210.63.38.209';
var erHostname='54.169.252.99'; // SaaS
//var erUrlPrefix='210.63.38.209';//for local test
var erUrlPrefix='54.169.252.99'; // SaaS
var _qevents = _qevents || [];
_qevents.push({
group : "ER",
cid : "saas_testing_ec",
uid : "",
act : "VIEW",
pid : "testproduct",
cat : "testcat",
ptuple : [
{
paypid : "testpay",
qty : "1",
unit_price : "12345",
pcat : "testpcat",
pmk : "testpromo",
}],
eturec : "",
oid : "",
ercamp : "testcamp",
erad : "testad",
});
var erUrlPrefix=('https:' == document.location.protocol ?'https://':'http://')+erHostname+'/';
function ERsend(){
_qevents = [];
_qevents.push({
group : document.getElementById("agroup").value,
cid : document.getElementById("acid").value,
uid : document.getElementById("auid").value,
act : document.getElementById("aact").value,
pid : document.getElementById("apid").value,
cat : document.getElementById("acat").value,
ptuple : [
{
paypid : document.getElementById("apaypid").value,
qty : document.getElementById("aqty").value,
unit_price : document.getElementById("aunit_price").value,
pcat : document.getElementById("apcat").value,
pmk : document.getElementById("apmk").value,
}],
eturec : document.getElementById("aeturec").value,
oid : document.getElementById("aoid").value,
ercamp : document.getElementById("aercamp").value,
erad : document.getElementById("aerad").value,
});
_qquery1 = [];
_qquery2 = [];
_qquery3 = [];
_qquery1.push({
});
_qquery2.push({
});
_qquery3.push({
});
var _qqueryList = [ _qquery1 , _qquery2, _qquery3 ];
ER.track.send(_qevents, [], '', _qqueryList);
}
(function() {
var er = document.createElement('script');
er.type = 'text/javascript';
er.async = true;
er.src = erUrlPrefix+'etu.js?'+(new Date().getDate());
var currentJs=document.getElementById('etu-recommender');
currentJs.parentNode.insertBefore(er,currentJs);
})();
//function getCustomizeActionData(){
//}
</script>
</head>
<body>
<h1>er.js testing EC site</h1>
<div id = "homepage">
Here is the home page of EC site
</div>
<br>
<br>
<div id = "setDefault">
<legend> default </legend>
<label> fill </label>
<input class = "default-action" type = "text" id = "dgroup" placeholder = "group" value = "ER"/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "dcid" placeholder = "cid" value = "saas_testing_ec"/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "duid" placeholder = "uid" value = ""/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "dact" placeholder = "act" value = "VIEW"/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "dcat" placeholder = "cat" value = "testcat"/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "dpid" placeholder = "pid" value = "testproduct"/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "dpcat" placeholder = "pcat" value = "testpcat"/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "dpaypid" placeholder = "paypid" value = "testpay"/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "dunit_price" placeholder = "unit_price" value = "12345"/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "dpmk" placeholder = "pmk" value = "testpromo"/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "dqty" placeholder = "qty" value = "1"/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "doid" placeholder = "oid" value = "NA"/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "dercamp" placeholder = "ercamp" value = "testcamp"/><br>
<label> fill </label>
<input class = "default-action" type = "text" id = "derad" placeholder = "erad" value = "testad"/><br>
<p></p>
</div>
<br>
<br>
<div id = "setAction">
<legend> action </legend>
<label> fill </label>
<input class = "custom-action" type = "text" id = "agroup" placeholder = "group" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "acid" placeholder = "cid" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "auid" placeholder = "uid" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "aact" placeholder = "act" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "acat" placeholder = "cat" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "apid" placeholder = "pid" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "apcat" placeholder = "pcat" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "apaypid" placeholder = "paypid" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "aunit_price" placeholder = "unit_price" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "apmk" placeholder = "pmk" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "aqty" placeholder = "qty" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "aoid" placeholder = "oid" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "aeturec" placeholder = "eturec" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "aercamp" placeholder = "ercamp" value = ""/><br>
<label> fill </label>
<input class = "custom-action" type = "text" id = "aerad" placeholder = "erad" value = ""/><br>
<button class = "test" type = "button" id="custom-click" onclick = "ERsend()"> 送出資料 </button>
</div>
</body>
</html>