-
Notifications
You must be signed in to change notification settings - Fork 2
/
elq_tracking.html
52 lines (47 loc) · 1.54 KB
/
elq_tracking.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
<html>
<head>
<script src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script src="elq_tracking-0.1.js"></script>
<script type="text/javascript">
//The page tracking can be called as shown below, where *siteid* is substituted for your eloqua org's siteid.
var elqTracker = new jQuery.elq(*siteid*);
elqTracker.pageTrack({success: function() {
console.log("this is the first callback");
elqTracker.getGUID(function(guid) {
console.log("guid gotten: " + guid);
});
}});
jQuery(document).ready(function() {
//Replace *siteid* with your org's siteid
jQuery("a").elqTrack(*siteid*);
jQuery("#track_form").submit(function() {
jQuery("#track_status").html("Tracking: " + $("#content").val());
var to_track = $("#content").val();
elqTracker.pageTrack({url: to_track, success: function() {
jQuery("#track_status").html("Tracking Complete");
}});
return false;
});
});
</script>
<style type="text/css">
* {margin: 0; padding: 0}
body {font-family: arial, helvetica; font-size: 14px;}
</style>
</head>
<body>
<p>This is a test page.</p>
<ul>
<li>This is a link to <a href="http://www.google.com">Google</a></li>
<li>This is a link to <a href="http://www.reddit.com">Reddit</a></li>
<li>This is a link to <a href="http://www.yahoo.com">Yahoo</a></li>
</ul>
<p>
<form id="track_form">
<input type="text" name="content" id="content" />
<input type="submit" value="Track" />
</form>
</p>
<p id="track_status"></p>
</body>
</html>