-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjira_tips.html
More file actions
164 lines (155 loc) · 5.91 KB
/
Copy pathjira_tips.html
File metadata and controls
164 lines (155 loc) · 5.91 KB
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
<!DOCTYPE html>
<html>
<head>
<title>JIRA tips</title>
<script>
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t,e){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="https://cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(n,a);analytics._loadOptions=e};analytics.SNIPPET_VERSION="4.1.0";
analytics.load("f0mkFrd38lR8LW97t73odW9VkiQP532m"); // Joe usual Write Key
//analytics.load("ReFiwPrbWdGBhNpcBOHMN5F42SxoIXT5"); // Hawthorne
//analytics.page("JIRA tips");
}}();
</script>
</head>
<body>
<ul>
<li>
<a href="https://joe-ayoub-segment.github.io/home.html">Home</a>
</li>
<li>
<a href="https://joe-ayoub-segment.github.io/sign_up.html">Sign up</a>
</li>
<li>
<a href="https://joe-ayoub-segment.github.io/video_tutorials.html">Confluece Video tutorials</a>
</li>
<li>
<a href="https://joe-ayoub-segment.github.io/jira_tips.html">JIRA tips</a>
</li>
<li>
<a href="https://joe-ayoub-segment.github.io/project_management.html">Project Management</a>
</li>
<li>
<a href="https://joe-ayoub-segment.github.io/collaboration_best_practices.html">Collaboration best practices</a>
</li>
</ul>
<h1>This is a test HTML page with Segment installed</h1>
<p>This is a test HTML page with the Segment snippet installed</p>
<br/>
<br/>
<br/>
<br/>
<div style="border:1px solid #CCC;">
<form name="register" onsubmit="fire_events(event)">
If you enjoyed this content then register for the JIRA tips course
<input type="hidden" name="course_type" value="JIRA tips course"/>
<br/>
<br/>
Full name
<input name="full_name" required="" size="81" type="text"/>
<br/>
<br/>
Email
<input name="email" required="" size="81" type="text"/>
<br/>
<br/>
<input name="submit" type="submit" value="submit"/>
</form>
<script type="text/javascript">
function fire_events(e){
e.preventDefault();
var form = e.target;
var email = form["email"].value;
var full_name = form["full_name"].value;
var course_type = form["course_type"].value;
var user = {
email: email,
full_name: full_name,
course_type: course_type
};
analytics.identify(user.full_name + '_id', {
email: user.email,
full_name: user.full_name
});
analytics.track('Course Registered', {
course_type: user.course_type
});
alert('done');
}
</script>
<br/>
<br/>
<br/>
<br/>
</div>
<div style="border:1px solid #CCC;">
<form name="order" onsubmit="submit_order(event)">
Buy the JIRA tips course now!
<br/>
<br/>
<input type="hidden" name="order_id" value=""/>
<input type="hidden" name="product_id" value="prod_1_id"/>
<input type="hidden" name="product_name" value="JIRA tips course"/>
<br/>
<br/>
Course duration
<select name="course_duration">
<option value="2 weeks">2 weeks</option>
<option value="4 weeks">4 weeks</option>
<option value="6 weeks">6 weeks</option>
<option value="8 weeks">8 weeks</option>
</select>
<br/>
<br/>
Full name
<input name="full_name" required="" size="81" type="text"/>
<br/>
<br/>
Email
<input name="email" required="" size="81" type="text"/>
<br/>
<br/>
<input name="submit" type="submit" value="Complete order"/>
</form>
<script type="text/javascript">
function submit_order(e){
e.preventDefault();
var form = e.target;
var email = form["email"].value;
var full_name = form["full_name"].value;
var order_id = Math.floor((Math.random() * 10000) + 1);
var product_id = form["product_id"].value;
var product_name = form["product_name"].value;
var course_duration = form["course_duration"].options[form["course_duration"].selectedIndex].text;
var product_price = 10;
if(course_duration == '4 weeks') {product_price = 20;}
if(course_duration == '6 weeks') {product_price = 30;}
if(course_duration == '8 weeks') {product_price = 40;}
var user = {
email: email,
full_name: full_name
};
analytics.identify(user.full_name + '_id', {
email: user.email,
full_name: user.full_name
});
analytics.track('Order Completed', {
order_id: order_id,
xxx: 'custom_dimension',
products: [ {
id: product_id,
name: product_name,
course_duration: course_duration,
price: product_price
},{
id: product_id + '_p2',
name: product_name + '_p2',
course_duration: course_duration + '_p2',
price: product_price + 15
}
]
});
alert('done');
}
</script>
</div>
</body>
</html>