//flood
/*This function will load script and call the callback once the script has loaded*/
function loadScriptAsync(scriptSrc, callback) {
if (typeof callback !== 'function') {
throw new Error('Not a valid callback for async script load');
}
var script = document.createElement('script');
script.onload = callback;
script.src = scriptSrc;
document.head.appendChild(script);
}
/* This is the part where you call the above defined function and "call back" your code which gets executed after the script has loaded */
loadScriptAsync('https://www.googletagmanager.com/gtag/js?id=DC-11365554', function(){
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'DC-11365554');
gtag('event', 'conversion', {
'allow_custom_scripts': true,
'send_to': 'DC-11365554/citic00/citic0+standard'
});
})
//fb
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '248749717235235');
fbq('track', 'PageView');
//fbq('track', 'Lead');
//ga
loadScriptAsync('https://www.googletagmanager.com/gtag/js?id=AW-10787029590', function(){
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-10787029590');
})
//function gtag_report_conversion(url) {
// var callback = function () {
// if (typeof(url) != 'undefined') {
// window.location = url;
// }
// };
// gtag('event', 'conversion', {
// 'send_to': 'AW-10787029590/_JSDCLyu9P4CENaE1Jco',
// 'event_callback': callback
// });
// return false;
//}
//universal
$(document).ready(function() {
$(document.body).prepend('
');
$('.appstore_down').click(function(){
gtag('event', 'conversion', {
'send_to': 'AW-10787029590/_JSDCLyu9P4CENaE1Jco' });
});
$('.gplay_down').click(function(){
gtag('event', 'conversion', {
'send_to': 'AW-10787029590/_JSDCLyu9P4CENaE1Jco' });
});
$('.harmony_down').click(function(){
gtag('event', 'conversion', {
'send_to': 'AW-10787029590/_JSDCLyu9P4CENaE1Jco' });
});
$('.baidu_down').click(function(){
gtag('event', 'conversion', {
'send_to': 'AW-10787029590/_JSDCLyu9P4CENaE1Jco' });
});
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
if (/huawei/i.test(userAgent)) {
$('#downBTN').click(function(){
gtag('event', 'conversion', {
'send_to': 'AW-10787029590/_JSDCLyu9P4CENaE1Jco' });
});
$(".subgrid .downloadnow").click(function(){
gtag('event', 'conversion', {
'send_to': 'AW-10787029590/_JSDCLyu9P4CENaE1Jco' });
});
}
if (/android/i.test(userAgent)) {
$('#downBTN').click(function(){
gtag('event', 'conversion', {
'send_to': 'AW-10787029590/_JSDCLyu9P4CENaE1Jco' });
});
$(".subgrid .downloadnow").click(function(){
gtag('event', 'conversion', {
'send_to': 'AW-10787029590/_JSDCLyu9P4CENaE1Jco' });
});
}
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
$('#downBTN').click(function(){
gtag('event', 'conversion', {
'send_to': 'AW-10787029590/_JSDCLyu9P4CENaE1Jco' });
});
$(".subgrid .downloadnow").click(function(){
gtag('event', 'conversion', {
'send_to': 'AW-10787029590/_JSDCLyu9P4CENaE1Jco' });
});
}
});