Commit b3608fb2 by vikas kushwaha

altitude

0 parents
No preview for this file type
No preview for this file type
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
images/10.png

4.24 KB

images/11.png

10.1 KB

images/12.png

9.65 KB

images/6.png

20.5 KB

No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
function Set_Cookie(name, value, expires, path, domain, secure) {
// set time, it's in milliseconds
var today = new Date();
today.setTime(today.getTime());
/*
* if the expires variable is set, make the correct expires time, the
* current script below will set it for x number of days, to make it for
* hours, delete * 24, for minutes, delete * 60 * 24
*/
if (expires) {
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date(today.getTime() + (expires));
document.cookie = name + "=" + escape(value)
+ ((expires) ? ";expires=" + expires_date.toGMTString() : "")
+ ((path) ? ";path=" + path : "")
+ ((domain) ? ";domain=" + domain : "")
+ ((secure) ? ";secure" : "");
}
//get cookie
function Get_Cookie(check_name) {
// first we'll split this cookie up into name/value pairs
// note: document.cookie only returns name=value, not the other components
var a_all_cookies = document.cookie.split(';');
var a_temp_cookie = '';
var cookie_name = '';
var cookie_value = '';
var b_cookie_found = false; // set boolean t/f default f
for (i = 0; i < a_all_cookies.length; i++) {
// now we'll split apart each name=value pair
a_temp_cookie = a_all_cookies[i].split('=');
// and trim left/right whitespace while we're at it
cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
// if the extracted name matches passed check_name
if (cookie_name == check_name) {
b_cookie_found = true;
// we need to handle case where cookie has no value but exists (no =
// sign, that is):
if (a_temp_cookie.length > 1) {
cookie_value = unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g,
''));
}
// note that in cases where cookie is initialized but no value, null
// is returned
return cookie_value;
break;
}
a_temp_cookie = null;
cookie_name = '';
}
if (!b_cookie_found) {
return null;
}
}
// this deletes the cookie when called
function Delete_Cookie( name, path, domain ) {
if ( Get_Cookie( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
\ No newline at end of file \ No newline at end of file
/**
* jQuery scroroller Plugin 1.0
*
* http://www.tinywall.net/
*
* Developers: Arun David, Boobalan
* Copyright (c) 2014
*/
(function($){
$(window).on("load",function(){
$(document).scrollzipInit();
$(document).rollerInit();
});
$(window).on("load scroll resize", function(){
$('.numscroller').scrollzip({
showFunction : function() {
numberRoller($(this).attr('data-slno'));
},
wholeVisible : false,
});
});
$.fn.scrollzipInit=function(){
$('body').prepend("<div style='position:fixed;top:0px;left:0px;width:0;height:0;' id='scrollzipPoint'></div>" );
};
$.fn.rollerInit=function(){
var i=0;
$('.numscroller').each(function() {
i++;
$(this).attr('data-slno',i);
$(this).addClass("roller-title-number-"+i);
});
};
$.fn.scrollzip = function(options){
var settings = $.extend({
showFunction : null,
hideFunction : null,
showShift : 0,
wholeVisible : false,
hideShift : 0,
}, options);
return this.each(function(i,obj){
$(this).addClass('scrollzip');
if ( $.isFunction( settings.showFunction ) ){
if(
!$(this).hasClass('isShown')&&
($(window).outerHeight()+$('#scrollzipPoint').offset().top-settings.showShift)>($(this).offset().top+((settings.wholeVisible)?$(this).outerHeight():0))&&
($('#scrollzipPoint').offset().top+((settings.wholeVisible)?$(this).outerHeight():0))<($(this).outerHeight()+$(this).offset().top-settings.showShift)
){
$(this).addClass('isShown');
settings.showFunction.call( this );
}
}
if ( $.isFunction( settings.hideFunction ) ){
if(
$(this).hasClass('isShown')&&
(($(window).outerHeight()+$('#scrollzipPoint').offset().top-settings.hideShift)<($(this).offset().top+((settings.wholeVisible)?$(this).outerHeight():0))||
($('#scrollzipPoint').offset().top+((settings.wholeVisible)?$(this).outerHeight():0))>($(this).outerHeight()+$(this).offset().top-settings.hideShift))
){
$(this).removeClass('isShown');
settings.hideFunction.call( this );
}
}
return this;
});
};
function numberRoller(slno){
var min=$('.roller-title-number-'+slno).attr('data-min');
var max=$('.roller-title-number-'+slno).attr('data-max');
var timediff=$('.roller-title-number-'+slno).attr('data-delay');
var increment=$('.roller-title-number-'+slno).attr('data-increment');
var numdiff=max-min;
var timeout=(timediff*1000)/numdiff;
//if(numinc<10){
//increment=Math.floor((timediff*1000)/10);
//}//alert(increment);
numberRoll(slno,min,max,increment,timeout);
}
function numberRoll(slno,min,max,increment,timeout){//alert(slno+"="+min+"="+max+"="+increment+"="+timeout);
if(min<=max){
$('.roller-title-number-'+slno).html(min);
min=parseInt(min)+parseInt(increment);
setTimeout(function(){numberRoll(eval(slno),eval(min),eval(max),eval(increment),eval(timeout))},timeout);
}else{
$('.roller-title-number-'+slno).html(max);
}
}
})(jQuery);
\ No newline at end of file \ No newline at end of file
//setting some default (change LP url for new Lps)
var conversion_tracking_lp_url = 'https://66andshibui.assetz-property.in/';
var site_visit_event_name = 'Visited Landing Page';
$(window).load(function () {
var getip_settings = {
"url": "https://ipv4-a.jsonip.com/",
"method": "GET",
"timeout": 0,
"crossOrigin": true,
"headers": {}
};
$.ajax(getip_settings).done(function (apiresponse, status) {
//console.log(status);
if (apiresponse['ip']) {
ip = apiresponse['ip'];
Set_Cookie('visiter_ip', ip);
var fbapi_data = {
"url": "https://fbconversion.realatte.com/api/facebook-conversion/track",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
data: JSON.stringify({
"landing_page_url": conversion_tracking_lp_url,
"email": "",
"mobile": "",
"event_name": site_visit_event_name,
"remote_address": ip,
"http_user_agent": navigator.userAgent
})
};
$.ajax(fbapi_data).done(function (response, status) {
console.log('FB Conv', response);
});
}
});
});
// to call this function set on click event on button or a tag eg--> onclick="send_fb_event('your_event_name');
function send_fb_event(event_name) {
var fbapi_data = {
"url": "https://fbconversion.realatte.com/api/facebook-conversion/track",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
data: JSON.stringify({
"landing_page_url": conversion_tracking_lp_url,
"email": "",
"mobile": "",
"event_name": event_name,
"remote_address": Get_Cookie('visiter_ip'),
"fbc": Get_Cookie('_fbc'),
"fbp": Get_Cookie('_fbp'),
"fb_login_id": Get_Cookie('c_user'),
"http_user_agent": navigator.userAgent
})
};
$.ajax(fbapi_data).done(function (response, status) {
console.log(response);
});
}
\ No newline at end of file \ No newline at end of file
jQuery(function ($) {
// Custom validation method to ensure the number starts with 6-9
jQuery.validator.addMethod(
"number",
function (value, element) {
return this.optional(element) || /^[6-9][0-9]{9}$/.test(value);
},
"Please enter a valid mobile number"
);
jQuery.validator.addMethod(
"country",
function (value, element) {
return this.optional(element) || /^[^+]/.test(value);
},
"Enter Number Without Country Code"
);
jQuery.validator.addMethod(
"mobile",
function (value, element) {
return this.optional(element) || $(element).intlTelInput("isValidNumber");
},
"Please enter a valid mobile number"
);
jQuery.validator.addMethod(
"alphabets",
function (value, element) {
return this.optional(element) || /^[a-zA-Z ]*$/.test(value);
},
"Please enter Alphabets only"
);
jQuery.validator.addMethod(
"email",
function (value, element) {
return (
this.optional(element) ||
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(
value
)
);
},
"Please enter a valid email address."
);
jQuery.validator.addMethod(
"valueNotEquals",
function (value, element, arg) {
return arg !== value;
},
"Value must not equal arg."
);
// Apply the validation rules to each form
const applyValidation = (formId) => {
if ($(formId).length > 0) {
$(formId).validate({
rules: {
fname: {
required: true,
maxlength: 100,
},
mobile: {
required: true,
minlength: 10,
maxlength: 10,
number: true, // Apply the custom 'number' validation method
},
email: {
required: true,
email: true,
},
},
messages: {
fname: {
required: "Enter Your Name",
},
mobile: {
required: "Enter Your Number",
},
email: {
required: "Enter Your Email",
},
},
});
}
};
// Apply validation to all forms
applyValidation("#contact-form");
applyValidation("#inter-form");
applyValidation("#price-popup");
applyValidation("#download-brochure");
applyValidation("#download-popup");
applyValidation("#floor-form");
applyValidation("#video-form");
applyValidation("#main-popup");
applyValidation("#float-form");
});
jQuery(document).ready(function($) {
//check for popup cookie if set don't open the dialog.
if (!Get_Cookie('popout')) {
//console.log($('.popupDiv'));
$(window).load(function() {
// var width = $(window).width();
// if(width >= 767){
setTimeout(function() {
$('#main-modal').modal('show');
}, 3000);
// }
});
}
$('.modal .close').click(function() {
Set_Cookie('popout', 'it works', '', '/', '', '');
// $('.popupDiv').fadeOut(1000);
// $('.overlay').fadeOut(1000);
});
// $('.popupDiv .popupBg').click(function () {
// Set_Cookie('popout', 'it works', '', '/', '', '');
// $('.popupDiv').fadeOut(1000);
// $('.overlay').fadeOut(1000);
// });
});
\ No newline at end of file \ No newline at end of file
<?php
class PostData
{
public function callback()
{
$channel = $_COOKIE['cstm_ppc_channel'];
$campaign = $_COOKIE['cstm_ppc_campaign'];
$placement = $_COOKIE['cstm_ppc_placement'];
$keyword = $_COOKIE['cstm_ppc_keyword'];
$device = $_COOKIE['cstm_ppc_device'];
$srd = $_COOKIE['srd'];
$gclid = $_COOKIE['gclid'];
$cookienum = $_COOKIE['cookienum'];
$fname = $_REQUEST['fname'];
$lname = $_REQUEST['lname'];
$email = $_REQUEST['email'];
$mobile = str_replace(' ', '', $_REQUEST['mobile']);
$source = $_REQUEST['source'];
$message = $_REQUEST['message'];
$visit_from = $_REQUEST['visit_from'];
$cc = $_REQUEST['cc'];
$ip = $_SERVER['REMOTE_ADDR'];
$duplicate_no = $_COOKIE['checkduplicate'];
$terms = $_REQUEST['terms'];
$fbclid = $_COOKIE['fbclid'];
$fbc = $_COOKIE['_fbc'];
$fbp = $_COOKIE['_fbp'];
$cuser = $_COOKIE['c_user'];
if ($fbc == "") {
$fbcidclick = $fbclid;
} else {
$fbcidclick = $fbc;
}
if ($terms == "terms") {
$wpmsg = true;
} else {
$wpmsg = false;
}
// $conf = $_REQUEST['conf'];
$name = $fname . ' ' . $lname;
$fullcc = "91" . '' . $mobile;
if ($mobile !== $duplicate_no) {
// Google Sheet Interation------------------
$postFields = "entry.2001853322=" . $fname;
$postFields .= "&entry.1189647193=" . $email;
$postFields .= "&entry.1227321992=" . $mobile;
$postFields .= "&entry.1632349928=" . urlencode($project_name);
$postFields .= "&entry.1660010704=" . $source;
$postFields .= '&entry.865191081=' . urlencode($_COOKIE['cstm_ppc_campaign']);
$postFields .= '&entry.831134418=' . urlencode($_COOKIE['cstm_ppc_channel']);
$postFields .= '&entry.597222109=' . urlencode($_COOKIE['cstm_ppc_keyword']);
$postFields .= '&entry.1223438499=' . urlencode($_COOKIE['cstm_ppc_placement']);
$postFields .= '&entry.2011391976=' . urlencode($_COOKIE['cstm_ppc_device']);
$postFields .= '&entry.2011391976=' . urlencode($_COOKIE['cstm_ppc_device']);
$postFields .= '&entry.2005032838=' . $gclid;
$postFields .= '&entry.1633429=' . $ip;
$ch3 = curl_init();
curl_setopt($ch3, CURLOPT_URL, "");
curl_setopt($ch3, CURLOPT_POST, 1);
curl_setopt($ch3, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($ch3, CURLOPT_HEADER, 0);
curl_setopt($ch3, CURLOPT_RETURNTRANSFER, true);
$result3 = curl_exec($ch3);
}
}
}
?>
\ No newline at end of file \ No newline at end of file
<?php
class PostData
{
public function callback()
{
$channel = $_COOKIE['cstm_ppc_channel'];
$campaign = $_COOKIE['cstm_ppc_campaign'];
$placement = $_COOKIE['cstm_ppc_placement'];
$keyword = $_COOKIE['cstm_ppc_keyword'];
$device = $_COOKIE['cstm_ppc_device'];
$gclid = $_COOKIE['gclid'];
$fname = $_REQUEST['fname'];
$lname = $_REQUEST['lname'];
$email = $_REQUEST['email'];
$mobile = str_replace(' ', '', $_REQUEST['mobile']);
$source = $_REQUEST['source'];
$name = $fname . ' ' . $lname;
$crm_pro = "The Altitude";
$fullmobile = "91" . $mobile;
$cam= "Digital";
$sub_cam = "Organic Search";
$cam_cat = "Website";
$cam_ref = "Website - Realatte";
if($channel == "GoogleSearch")
{
$cam= "Digital";
$sub_cam = "Adwords";
$cam_cat = "Google Search";
$cam_ref = "Google Search - Realatte";
}
if($channel == "GoogleDiscovery")
{
$cam= "Digital";
$sub_cam = "Discovery";
$cam_cat = "Google Discovery";
$cam_ref = "Google Discovery - Realatte";
}
// Google Sheet Interation------------------
$postFields = "entry.449648499=" . $fname;
$postFields .= "&entry.1379833540=" . $email;
$postFields .= "&entry.758332158=" . $fullmobile;
$postFields .= "&entry.1693361781=" . $source;
$postFields .= '&entry.1830911442=' . urlencode($_COOKIE['cstm_ppc_campaign']);
$postFields .= '&entry.939490048=' . urlencode($_COOKIE['cstm_ppc_channel']);
$postFields .= '&entry.729166844=' . urlencode($_COOKIE['cstm_ppc_keyword']);
$postFields .= '&entry.839903606=' . urlencode($_COOKIE['cstm_ppc_placement']);
$postFields .= '&entry.2003337495=' . urlencode($_COOKIE['cstm_ppc_device']);
$postFields .= '&entry.1966964226=' . $gclid;
$ch3 = curl_init();
curl_setopt($ch3, CURLOPT_URL, "https://docs.google.com/forms/u/0/d/e/1FAIpQLSeSMHdszB8Zyn1lMN6FaQF-hkavyFV5FDMcgwsIWW2JT2yn2Q/formResponse");
curl_setopt($ch3, CURLOPT_POST, 1);
curl_setopt($ch3, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($ch3, CURLOPT_HEADER, 0);
curl_setopt($ch3, CURLOPT_RETURNTRANSFER, true);
$result3 = curl_exec($ch3);
/////////////////SFDC/////////////////////
$curl = curl_init();
$post_data = array(
'FirstName' => $fname,
'LastName' => $fname,
'Mobile' => $mobile,
'Email' => $email,
'ProjectName' => $crm_pro,
'Medium' => 'Marketing',
'Campaign' => $cam,
'SubCampaign' => $sub_cam,
'CampaignCategory' => $cam_cat,
'SourceURL' => "Digital",
'CampaignReference'=> $cam_ref,
'Origin'=> "API",
"Remarks"=>"Lead Remarks",
"WhatsappConsent"=> null
);
$json_post = json_encode($post_data);
// var_dump($json_post);
curl_setopt_array($curl, array(
//CURLOPT_URL => "https://assetz.secure.force.com/services/apexrest/Assetz_Lead?APIKey=41737365747a4150494c656164",
CURLOPT_URL => "https://assetzpropertymanagementservices.my.salesforce-sites.com/services/apexrest/Assetz_Lead?APIKey=41737365747a4150494c656164",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS =>$json_post,
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: application/json",
),
));
$response = curl_exec($curl);
var_dump($response,$cam);
$err = curl_error($curl);
curl_close($curl);
// die;
// do not delete
return true;
}
}
\ No newline at end of file \ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!