no wp
This commit is contained in:
@@ -1,60 +0,0 @@
|
||||
<?php
|
||||
|
||||
function CookieData() { ?>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function(){
|
||||
function setCookie(name, value, days){
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime() + (days*24*60*60*1000));
|
||||
var expires = "; expires=" + date.toGMTString();
|
||||
document.cookie = name + "=" + value + expires;
|
||||
|
||||
}
|
||||
function getParam(p){
|
||||
var match = RegExp('[?&]' + p + '=([^&]*)').exec(window.location.search);
|
||||
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
|
||||
}
|
||||
var gclid = getParam('gclid');
|
||||
var CustomField1 = getParam('CustomField1');
|
||||
var CustomField2 = getParam('CustomField2');
|
||||
var CustomField3 = getParam('CustomField3');
|
||||
var CustomField4 = getParam('CustomField4');
|
||||
var cid = getParam('cid');
|
||||
|
||||
if(gclid){
|
||||
var gclsrc = getParam('gclsrc');
|
||||
if(!gclsrc || gclsrc.indexOf('aw') !== -1){
|
||||
setCookie('gclid', gclid, 90);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function readCookie(name) {
|
||||
var match = document.cookie.match(new RegExp(name + '=([^;]+)'));
|
||||
if (match) {
|
||||
return match[1];
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
jQuery('input[name="gclid_data"]').val(readCookie('gclid'));
|
||||
jQuery('input[name="CustomField1"]').val(readCookie('CustomField1'));
|
||||
jQuery('input[name="CustomField2"]').val(readCookie('CustomField2'));
|
||||
jQuery('input[name="CustomField3"]').val(readCookie('CustomField3'));
|
||||
jQuery('input[name="CustomField4"]').val(readCookie('CustomField4'));
|
||||
jQuery('input[name="cid"]').val(readCookie('cid'));
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user