-
Notifications
You must be signed in to change notification settings - Fork 3
/
quantcast_updated_script_and_userid.patch
104 lines (104 loc) · 4.09 KB
/
quantcast_updated_script_and_userid.patch
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
diff --git a/quantcast.module b/quantcast.module
index 6293790..0f8eaf3 100644
--- a/quantcast.module
+++ b/quantcast.module
@@ -113,6 +113,7 @@ function quantcast_page_build(&$page) {
$scope = variable_get('quantcast_js_scope', 'page_bottom');
$vars = array(
'pcode' => variable_get('quantcast_account', ''),
+ 'uid' => md5($user->uid),
);
if ($scope == 'split') {
$head = array(
diff --git a/theme/quantcast-tag-body.tpl.php b/theme/quantcast-tag-body.tpl.php
index 59867db..2a10076 100644
--- a/theme/quantcast-tag-body.tpl.php
+++ b/theme/quantcast-tag-body.tpl.php
@@ -1,8 +1,11 @@
-<script type="text/javascript">
-<!--//--><![CDATA[//><!--
- _qevents.push({qacct:"<?php print $vars['pcode']; ?>"});
-//--><!]]>
+
+ <script>
+ <!--//--><![CDATA[//><!--
+
+ var qcdata = {qacct: '<?php print $vars['pcode']; ?>',
+ uid: '<?php print $vars['uid']; ?>'};
+ //--><!]]>
</script>
<noscript>
- <div style="display:none;"><img src="//pixel.quantserve.com/pixel/<?php print $vars['pcode']; ?>.gif" border="0" height="1" width="1" alt="Quantcast"/></div>
+ <img src="//pixel.quantserve.com/pixel/<?php print $vars['pcode']; ?>.gif?labels=_fp.event.Default" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>
</noscript>
diff --git a/theme/quantcast-tag-full.tpl.php b/theme/quantcast-tag-full.tpl.php
index 34b7230..3316440 100644
--- a/theme/quantcast-tag-full.tpl.php
+++ b/theme/quantcast-tag-full.tpl.php
@@ -1,17 +1,20 @@
-<script type="text/javascript">
-<!--//--><![CDATA[//><!--
- var _qevents = _qevents || [];
- (function() {
- var elem = document.createElement('script');
- elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js";
- elem.async = true;
- elem.type = "text/javascript";
- var scpt = document.getElementsByTagName('script')[0];
- scpt.parentNode.insertBefore(elem, scpt);
- })();
- _qevents.push({qacct:"<?php print $vars['pcode']; ?>"});
-//--><!]]>
+
+ <script>
+ <!--//--><![CDATA[//><!--
+ qcdata = {} || qcdata;
+ (function(){
+ var elem = document.createElement('script');
+ elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://pixel") + ".quantserve.com/aquant.js?a=<?php print $vars['pcode']; ?>";
+ elem.async = true;
+ elem.type = "text/javascript";
+ var scpt = document.getElementsByTagName('script')[0];
+ scpt.parentNode.insertBefore(elem,scpt);
+ }());
+
+ var qcdata = {qacct: '<?php print $vars['pcode']; ?>',
+ uid: '<?php print $vars['uid']; ?>'};
+ //--><!]]>
</script>
<noscript>
- <div style="display:none;"><img src="//pixel.quantserve.com/pixel/<?php print $vars['pcode']; ?>.gif" border="0" height="1" width="1" alt="Quantcast"/></div>
+ <img src="//pixel.quantserve.com/pixel/<?php print $vars['pcode']; ?>.gif?labels=_fp.event.Default" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>
</noscript>
diff --git a/theme/quantcast-tag-head.tpl.php b/theme/quantcast-tag-head.tpl.php
index 653429a..7c4c196 100644
--- a/theme/quantcast-tag-head.tpl.php
+++ b/theme/quantcast-tag-head.tpl.php
@@ -1,13 +1,15 @@
-<script type="text/javascript">
-<!--//--><![CDATA[//><!--
- var _qevents = _qevents || [];
- (function() {
- var elem = document.createElement('script');
- elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js";
- elem.async = true;
- elem.type = "text/javascript";
- var scpt = document.getElementsByTagName('script')[0];
- scpt.parentNode.insertBefore(elem, scpt);
- })();
-//--><!]]>
+
+ <script>
+ <!--//--><![CDATA[//><!--
+ qcdata = {} || qcdata;
+ (function(){
+ var elem = document.createElement('script');
+ elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://pixel") + ".quantserve.com/aquant.js?a=<?php print $vars['pcode']; ?>";
+ elem.async = true;
+ elem.type = "text/javascript";
+ var scpt = document.getElementsByTagName('script')[0];
+ scpt.parentNode.insertBefore(elem,scpt);
+ }());
+
+ //--><!]]>
</script>