-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemo.html
126 lines (123 loc) · 3.72 KB
/
demo.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>scMap Demo</title>
<meta name="title" content="">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<link rel="stylesheet" href="css/demo.css">
</head>
<body>
<div id="container">
<header>
<!-- HEADER -->
</header>
<div id="main">
<h1>Omniture Site Catalyst - scMap Demo</h1>
<p>* Remember to add a valid s_code file to this page.</p>
<hr>
<h2>Custom Link Tracking</h2>
<button data-sc-item="tracked-item" title="Sample Tracked Item">Sample Tracked Item ("tracked-item" in map)</button>
<button data-sc-item="tracked-item2" title="Another Tracked Item">Another Tracked Item ("tracked-item2" in map)</button>
<button data-sc-item="tracked-item" title="Yet Another Tracked Item">Yet Another Tracked Item ("tracked-item" in map)</button>
<button data-sc-item="tracked-item2" title="And Still Another Tracked Item">And Still Another Tracked Item ("tracked-item2" in map)</button>
<p>There are only two templates in the map for these elements. The idea is to have one map item for each tracking item that shares the same properties.</p>
<hr>
<h2>Custom Form Tracking</h2>
<p>Use a proxy for the form submission to see tracking codes.</p>
<form action="#" data-sc-item="tracked-form">
<label>Name <input type="text" name="name" required="required"></label>
<label>Email <input type="email" name="email" required="required"></label>
<button type="submit">SUBMIT</button>
</form>
<p>Form values get added to the tracking.</p>
<hr>
<h2>Here's the map:</h2>
<pre>
scMap = {
/*
* Any property in "s" can be added through the map.
* Wildcards that are escaped with { } will be replaced
* with the elements matching attribute.
*
*/
'tracked-item' : {
'linkTrackName':'Button-{title}',
'linkTrackVars':'products,events,eVar9',
'linkTrackEvents':'event9',
'type':'o',
'products':'product',
'eVar9': 'Just a button',
'events':'event9'
},
'tracked-item2' : {
'linkTrackName':'Button-{title}',
'linkTrackVars':'events,eVar9',
'linkTrackEvents':'event9',
'type':'o',
'eVar9': 'Just another button',
'events':'event9'
},
'tracked-form' :{
'linkTrackName':'Form',
'linkTrackVars':'events,eVar1,eVar2',
'linkTrackEvents':'event1',
'type':'o',
'eVar1': 'Name: {name}',
'eVar2': 'Email: {email}',
'events':'event1'
}
}
</pre>
</div>
<footer>
<!-- FOOTER -->
</footer>
</div>
<!--
Scripts loaded like this for demo purposes.
Use a script loader.
-->
<script type="text/javascript" src="libs/s_code.js"></script>
<script type="text/javascript" src="scMap.js"></script>
<script type="text/javascript">
scMap = {
/*
* Any property in "s" can be added through the map.
* Wildcards that are escaped with { } will be replaced
* with the elements matching attribute.
*
*/
'tracked-item' : {
'linkTrackName':'Button-{title}',
'linkTrackVars':'products,events,eVar9',
'linkTrackEvents':'event9',
'type':'o',
'products':'product',
'eVar9': 'Just a button',
'events':'event9'
},
'tracked-item2' : {
'linkTrackName':'Button-{title}',
'linkTrackVars':'events,eVar9',
'linkTrackEvents':'event9',
'type':'o',
'eVar9': 'Just another button',
'events':'event9'
},
'tracked-form' :{
'linkTrackName':'Form',
'linkTrackVars':'events,eVar1,eVar2',
'linkTrackEvents':'event1',
'type':'o',
'eVar1': 'Name: {name}',
'eVar2': 'Email: {email}',
'events':'event1'
}
}
siteCatalyst.init();
</script>
</body>
</html>