Version Description
- Bug fix - missing trackingObj
Download this release
Release Info
Developer | DavidWells |
Plugin | WordPress Landing Pages |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.4.0 to 1.4.1
- landing-pages.php +2 -2
- modules/module.global-settings.php +1 -1
- modules/module.javascript-frontend.php +1 -1
- readme.txt +5 -2
- shared/tracking/js/store.lead.ajax.js +2 -2
- shared/tracking/page-tracking.js +192 -170
landing-pages.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
Plugin Name: Landing Pages
|
4 |
Plugin URI: http://www.inboundnow.com/landing-pages/
|
5 |
Description: The first true all-in-one Landing Page solution for WordPress, including ongoing conversion metrics, a/b split testing, unlimited design options and so much more!
|
6 |
-
Version: 1.4.
|
7 |
Author: David Wells, Hudson Atwell
|
8 |
Author URI: http://www.inboundnow.com/
|
9 |
Text Domain: landing-pages
|
10 |
Domain Path: shared/languages/landing-pages/
|
11 |
*/
|
12 |
|
13 |
-
define('LANDINGPAGES_CURRENT_VERSION', '1.4.
|
14 |
define('LANDINGPAGES_URLPATH', WP_PLUGIN_URL.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
15 |
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
16 |
define('LANDINGPAGES_PLUGIN_SLUG', plugin_basename( dirname(__FILE__) ) );
|
3 |
Plugin Name: Landing Pages
|
4 |
Plugin URI: http://www.inboundnow.com/landing-pages/
|
5 |
Description: The first true all-in-one Landing Page solution for WordPress, including ongoing conversion metrics, a/b split testing, unlimited design options and so much more!
|
6 |
+
Version: 1.4.1
|
7 |
Author: David Wells, Hudson Atwell
|
8 |
Author URI: http://www.inboundnow.com/
|
9 |
Text Domain: landing-pages
|
10 |
Domain Path: shared/languages/landing-pages/
|
11 |
*/
|
12 |
|
13 |
+
define('LANDINGPAGES_CURRENT_VERSION', '1.4.1' );
|
14 |
define('LANDINGPAGES_URLPATH', WP_PLUGIN_URL.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
15 |
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
16 |
define('LANDINGPAGES_PLUGIN_SLUG', plugin_basename( dirname(__FILE__) ) );
|
modules/module.global-settings.php
CHANGED
@@ -275,7 +275,7 @@ function lp_display_global_settings()
|
|
275 |
</center>
|
276 |
</div>
|
277 |
<div id="custom-templates">
|
278 |
-
<center><a href="http://
|
279 |
</center>
|
280 |
</div>
|
281 |
</div>
|
275 |
</center>
|
276 |
</div>
|
277 |
<div id="custom-templates">
|
278 |
+
<center><a href="http://www.inboundnow.com/custom-wordpress-landing-page-setup/" target=="_blank"><img src="<?php echo LANDINGPAGES_URLPATH;?>/images/custom-setup-image.png"></a>
|
279 |
</center>
|
280 |
</div>
|
281 |
</div>
|
modules/module.javascript-frontend.php
CHANGED
@@ -42,7 +42,7 @@ function lp_fontend_enqueue_scripts($hook)
|
|
42 |
$lead_data_array['lead_uid'] = $lead_unique_key;
|
43 |
$type = 'wpluid';
|
44 |
}
|
45 |
-
wp_register_script('funnel-tracking',LANDINGPAGES_URLPATH . '
|
46 |
wp_enqueue_script('funnel-tracking');
|
47 |
$time = current_time( 'timestamp', 0 ); // Current wordpress time from settings
|
48 |
$wordpress_date_time = date("Y-m-d G:i:s T", $time);
|
42 |
$lead_data_array['lead_uid'] = $lead_unique_key;
|
43 |
$type = 'wpluid';
|
44 |
}
|
45 |
+
wp_register_script('funnel-tracking',LANDINGPAGES_URLPATH . 'shared/tracking/page-tracking.js', array( 'jquery', 'jquery-cookie'));
|
46 |
wp_enqueue_script('funnel-tracking');
|
47 |
$time = current_time( 'timestamp', 0 ); // Current wordpress time from settings
|
48 |
$wordpress_date_time = date("Y-m-d G:i:s T", $time);
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
7 |
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
|
8 |
Requires at least: 3.7
|
9 |
Tested up to: 3.8
|
10 |
-
Stable Tag: 1.4.
|
11 |
|
12 |
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
|
13 |
|
@@ -67,7 +67,10 @@ The plugin is also fully extendable and has a number of <a href='http://docs.inb
|
|
67 |
3. Manage Split Testing Page
|
68 |
4. Choose from a ton of pre-made templates, use your existing design, or design your own theme!
|
69 |
|
70 |
-
== Changelog ==
|
|
|
|
|
|
|
71 |
= 1.4.0 =
|
72 |
* Added feature request form to all plugin admin pages. Submit your feature requests today! =)
|
73 |
|
7 |
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
|
8 |
Requires at least: 3.7
|
9 |
Tested up to: 3.8
|
10 |
+
Stable Tag: 1.4.1
|
11 |
|
12 |
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
|
13 |
|
67 |
3. Manage Split Testing Page
|
68 |
4. Choose from a ton of pre-made templates, use your existing design, or design your own theme!
|
69 |
|
70 |
+
== Changelog ==
|
71 |
+
= 1.4.1 =
|
72 |
+
* Bug fix - missing trackingObj
|
73 |
+
|
74 |
= 1.4.0 =
|
75 |
* Added feature request form to all plugin admin pages. Submit your feature requests today! =)
|
76 |
|
shared/tracking/js/store.lead.ajax.js
CHANGED
@@ -30,7 +30,7 @@ jQuery(document).ready(function($) {
|
|
30 |
var company = "";
|
31 |
var address = "";
|
32 |
|
33 |
-
var tracking_obj =
|
34 |
var page_view_count = countProperties(pageviewObj);
|
35 |
//console.log("view count" + page_view_count);
|
36 |
|
@@ -267,7 +267,7 @@ jQuery(document).ready(function($) {
|
|
267 |
|
268 |
e.preventDefault(); // halt normal form
|
269 |
|
270 |
-
var tracking_obj =
|
271 |
var page_view_count = countProperties(pageviewObj);
|
272 |
//console.log("view count" + page_view_count);
|
273 |
|
30 |
var company = "";
|
31 |
var address = "";
|
32 |
|
33 |
+
var tracking_obj = "";
|
34 |
var page_view_count = countProperties(pageviewObj);
|
35 |
//console.log("view count" + page_view_count);
|
36 |
|
267 |
|
268 |
e.preventDefault(); // halt normal form
|
269 |
|
270 |
+
var tracking_obj = "";
|
271 |
var page_view_count = countProperties(pageviewObj);
|
272 |
//console.log("view count" + page_view_count);
|
273 |
|
shared/tracking/page-tracking.js
CHANGED
@@ -157,115 +157,115 @@ function add_page_timeout(date, minutes) {
|
|
157 |
|
158 |
/* Date Format 1.2.3 */
|
159 |
var dateFormat = function () {
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
}();
|
237 |
|
238 |
// Some common format strings
|
239 |
dateFormat.masks = {
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
};
|
253 |
|
254 |
// Internationalization strings
|
255 |
dateFormat.i18n = {
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
};
|
265 |
|
266 |
// For convenience...
|
267 |
Date.prototype.format = function (mask, utc) {
|
268 |
-
|
269 |
};
|
270 |
/* Query String for utm params
|
271 |
// Query String Stuff
|
@@ -307,13 +307,13 @@ function add_page_timeout(date, minutes) {
|
|
307 |
if (typeof urlParams[k] == "object") {
|
308 |
for (var k2 in urlParams[k])
|
309 |
jQuery.cookie(k2, urlParams[k][k2], { expires: 365 });
|
310 |
-
|
311 |
-
|
312 |
}
|
313 |
else {
|
314 |
jQuery.cookie(k, urlParams[k], { expires: 365 }); }
|
315 |
-
|
316 |
-
|
317 |
}
|
318 |
|
319 |
}
|
@@ -348,73 +348,95 @@ var current_page_id = wplft.post_id;
|
|
348 |
var referrer_is = document.referrer;
|
349 |
if (typeof pageviewObj =='object' && pageviewObj)
|
350 |
{
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
|
413 |
} else {
|
414 |
// Create initial pageviewObj
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
|
419 |
}
|
420 |
|
@@ -424,11 +446,11 @@ jQuery.totalStorage('page_views', pageviewObj);
|
|
424 |
|
425 |
/* Start Legacy Cookie Storage */
|
426 |
if (typeof data_block =='object' && data_block) {
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
} else {
|
431 |
-
|
432 |
-
|
433 |
}
|
434 |
/* End Legacy Cookie Storage */
|
157 |
|
158 |
/* Date Format 1.2.3 */
|
159 |
var dateFormat = function () {
|
160 |
+
var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
|
161 |
+
timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
|
162 |
+
timezoneClip = /[^-+\dA-Z]/g,
|
163 |
+
pad = function (val, len) {
|
164 |
+
val = String(val);
|
165 |
+
len = len || 2;
|
166 |
+
while (val.length < len) val = "0" + val;
|
167 |
+
return val;
|
168 |
+
};
|
169 |
+
|
170 |
+
// Regexes and supporting functions are cached through closure
|
171 |
+
return function (date, mask, utc) {
|
172 |
+
var dF = dateFormat;
|
173 |
+
|
174 |
+
// You can't provide utc if you skip other args (use the "UTC:" mask prefix)
|
175 |
+
if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) {
|
176 |
+
mask = date;
|
177 |
+
date = undefined;
|
178 |
+
}
|
179 |
+
|
180 |
+
// Passing date through Date applies Date.parse, if necessary
|
181 |
+
date = date ? new Date(date) : new Date;
|
182 |
+
if (isNaN(date)) throw SyntaxError("invalid date");
|
183 |
+
|
184 |
+
mask = String(dF.masks[mask] || mask || dF.masks["default"]);
|
185 |
+
|
186 |
+
// Allow setting the utc argument via the mask
|
187 |
+
if (mask.slice(0, 4) == "UTC:") {
|
188 |
+
mask = mask.slice(4);
|
189 |
+
utc = true;
|
190 |
+
}
|
191 |
+
|
192 |
+
var _ = utc ? "getUTC" : "get",
|
193 |
+
d = date[_ + "Date"](),
|
194 |
+
D = date[_ + "Day"](),
|
195 |
+
m = date[_ + "Month"](),
|
196 |
+
y = date[_ + "FullYear"](),
|
197 |
+
H = date[_ + "Hours"](),
|
198 |
+
M = date[_ + "Minutes"](),
|
199 |
+
s = date[_ + "Seconds"](),
|
200 |
+
L = date[_ + "Milliseconds"](),
|
201 |
+
o = utc ? 0 : date.getTimezoneOffset(),
|
202 |
+
flags = {
|
203 |
+
d: d,
|
204 |
+
dd: pad(d),
|
205 |
+
ddd: dF.i18n.dayNames[D],
|
206 |
+
dddd: dF.i18n.dayNames[D + 7],
|
207 |
+
m: m + 1,
|
208 |
+
mm: pad(m + 1),
|
209 |
+
mmm: dF.i18n.monthNames[m],
|
210 |
+
mmmm: dF.i18n.monthNames[m + 12],
|
211 |
+
yy: String(y).slice(2),
|
212 |
+
yyyy: y,
|
213 |
+
h: H % 12 || 12,
|
214 |
+
hh: pad(H % 12 || 12),
|
215 |
+
H: H,
|
216 |
+
HH: pad(H),
|
217 |
+
M: M,
|
218 |
+
MM: pad(M),
|
219 |
+
s: s,
|
220 |
+
ss: pad(s),
|
221 |
+
l: pad(L, 3),
|
222 |
+
L: pad(L > 99 ? Math.round(L / 10) : L),
|
223 |
+
t: H < 12 ? "a" : "p",
|
224 |
+
tt: H < 12 ? "am" : "pm",
|
225 |
+
T: H < 12 ? "A" : "P",
|
226 |
+
TT: H < 12 ? "AM" : "PM",
|
227 |
+
Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
|
228 |
+
o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
|
229 |
+
S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
|
230 |
+
};
|
231 |
+
|
232 |
+
return mask.replace(token, function ($0) {
|
233 |
+
return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
|
234 |
+
});
|
235 |
+
};
|
236 |
}();
|
237 |
|
238 |
// Some common format strings
|
239 |
dateFormat.masks = {
|
240 |
+
"default": "ddd mmm dd yyyy HH:MM:ss",
|
241 |
+
shortDate: "m/d/yy",
|
242 |
+
mediumDate: "mmm d, yyyy",
|
243 |
+
longDate: "mmmm d, yyyy",
|
244 |
+
fullDate: "dddd, mmmm d, yyyy",
|
245 |
+
shortTime: "h:MM TT",
|
246 |
+
mediumTime: "h:MM:ss TT",
|
247 |
+
longTime: "h:MM:ss TT Z",
|
248 |
+
isoDate: "yyyy-mm-dd",
|
249 |
+
isoTime: "HH:MM:ss",
|
250 |
+
isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
|
251 |
+
isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
|
252 |
};
|
253 |
|
254 |
// Internationalization strings
|
255 |
dateFormat.i18n = {
|
256 |
+
dayNames: [
|
257 |
+
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
|
258 |
+
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
|
259 |
+
],
|
260 |
+
monthNames: [
|
261 |
+
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
|
262 |
+
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
|
263 |
+
]
|
264 |
};
|
265 |
|
266 |
// For convenience...
|
267 |
Date.prototype.format = function (mask, utc) {
|
268 |
+
return dateFormat(this, mask, utc);
|
269 |
};
|
270 |
/* Query String for utm params
|
271 |
// Query String Stuff
|
307 |
if (typeof urlParams[k] == "object") {
|
308 |
for (var k2 in urlParams[k])
|
309 |
jQuery.cookie(k2, urlParams[k][k2], { expires: 365 });
|
310 |
+
console.log(k2);
|
311 |
+
console.log(urlParams[k][k2]);
|
312 |
}
|
313 |
else {
|
314 |
jQuery.cookie(k, urlParams[k], { expires: 365 }); }
|
315 |
+
console.log(k);
|
316 |
+
console.log(urlParams[k]);
|
317 |
}
|
318 |
|
319 |
}
|
348 |
var referrer_is = document.referrer;
|
349 |
if (typeof pageviewObj =='object' && pageviewObj)
|
350 |
{
|
351 |
+
// If pageviewObj exists, do this
|
352 |
+
var page_seen = pageviewObj[current_page_id];
|
353 |
+
if(typeof(page_seen) != "undefined" && page_seen !== null) {
|
354 |
+
var view_count = pageviewObj[current_page_id].length - 1;
|
355 |
+
var last_view = pageviewObj[current_page_id][view_count];
|
356 |
+
//console.log("last view" + last_view);
|
357 |
+
|
358 |
+
// Safari Timezone cleaners
|
359 |
+
var last_view = last_view.replace(/ UTC/);
|
360 |
+
var last_view = last_view.replace(/-/g, "/");
|
361 |
+
var last_view = last_view.replace(/undefined/g, "");
|
362 |
+
var datetime = datetime.replace(/ UTC/);
|
363 |
+
var datetime = datetime.replace(/-/g, "/");
|
364 |
+
var datetime = datetime.replace(/undefined/g, "");
|
365 |
+
|
366 |
+
|
367 |
+
var timeout = new Date(last_view).getTime() + 30*1000;
|
368 |
+
//console.log("timeout " + timeout);
|
369 |
+
var timeout = dateFormat(timeout, "yyyy-mm-dd hh:MM:ss");
|
370 |
+
var wait_time = Math.abs(Date.parse(last_view) - Date.parse(timeout)) // output timeout time 30sec;
|
371 |
+
var current_date = dateFormat(datetime, "yyyy-mm-dd hh:MM:ss");
|
372 |
+
var time_check = Math.abs(Date.parse(last_view) - Date.parse(current_date));
|
373 |
+
//console.log("Wait Time:" + wait_time);
|
374 |
+
//console.log("Time Check:" + time_check);
|
375 |
+
|
376 |
+
if (time_check > wait_time ){
|
377 |
+
console.log('time out happened');
|
378 |
+
pageviewObj[current_page_id].push(datetime); // log page view
|
379 |
+
// run page view update for timeout
|
380 |
+
if (typeof (lead_id) != "undefined" && lead_id != null && lead_id != "") {
|
381 |
+
jQuery.ajax({
|
382 |
+
type: 'POST',
|
383 |
+
url: wplft.admin_url,
|
384 |
+
data: {
|
385 |
+
action: 'wpl_track_user',
|
386 |
+
wp_lead_uid: lead_uid,
|
387 |
+
wp_lead_id: lead_id,
|
388 |
+
page_id: current_page_id,
|
389 |
+
current_url: window.location.href,
|
390 |
+
json: '0'
|
391 |
+
},
|
392 |
+
success: function(user_id){
|
393 |
+
console.log('Page View Fired');
|
394 |
+
},
|
395 |
+
error: function(MLHttpRequest, textStatus, errorThrown){
|
396 |
+
//alert(MLHttpRequest+' '+errorThrown+' '+textStatus);
|
397 |
+
//die();
|
398 |
+
}
|
399 |
+
|
400 |
+
});
|
401 |
+
}
|
402 |
+
// Check if refferrer not main site log the referall data in lead record
|
403 |
+
|
404 |
+
} else {
|
405 |
+
console.log('30 sec timeout not done: ' + Math.abs(wait_time - time_check)*.001 + " seconds left");
|
406 |
+
}
|
407 |
+
|
408 |
+
} else {
|
409 |
+
pageviewObj[current_page_id] = [];
|
410 |
+
pageviewObj[current_page_id].push(datetime);
|
411 |
+
if (typeof (lead_id) != "undefined" && lead_id != null && lead_id != "") {
|
412 |
+
jQuery.ajax({
|
413 |
+
type: 'POST',
|
414 |
+
url: wplft.admin_url,
|
415 |
+
data: {
|
416 |
+
action: 'wpl_track_user',
|
417 |
+
wp_lead_uid: lead_uid,
|
418 |
+
wp_lead_id: lead_id,
|
419 |
+
page_id: current_page_id,
|
420 |
+
current_url: window.location.href,
|
421 |
+
json: '0'
|
422 |
+
},
|
423 |
+
success: function(user_id){
|
424 |
+
console.log('Page View Fired');
|
425 |
+
},
|
426 |
+
error: function(MLHttpRequest, textStatus, errorThrown){
|
427 |
+
//alert(MLHttpRequest+' '+errorThrown+' '+textStatus);
|
428 |
+
//die();
|
429 |
+
}
|
430 |
+
|
431 |
+
});
|
432 |
+
}
|
433 |
+
}
|
434 |
|
435 |
} else {
|
436 |
// Create initial pageviewObj
|
437 |
+
var pageviewObj = {};
|
438 |
+
pageviewObj[current_page_id] = [];
|
439 |
+
pageviewObj[current_page_id].push(datetime);
|
440 |
|
441 |
}
|
442 |
|
446 |
|
447 |
/* Start Legacy Cookie Storage */
|
448 |
if (typeof data_block =='object' && data_block) {
|
449 |
+
var count = countProperties(data_block);
|
450 |
+
data_block.items.push({ id : count+1, current_page: current_page, timestamp: datetime, referrer: referrer});
|
451 |
+
jQuery.cookie('user_data_json', JSON.stringify(data_block), { expires: 1, path: '/' });
|
452 |
} else {
|
453 |
+
data_block = {items: [{id: '1', current_page: current_page,timestamp: datetime, referrer: referrer, original_referrer: referrer},]};
|
454 |
+
jQuery.cookie('user_data_json', JSON.stringify(data_block), { expires: 1, path: '/' });
|
455 |
}
|
456 |
/* End Legacy Cookie Storage */
|