Best Branding Company in India | iBrandox™ Digital Marketing

  • Web Development / Technology Solutions within agreed timelines.
  • Result Driven Brand Building Digitally
  • Customized e-commerce solutions. The exceptional
  • Drive Right Leads from the Right Audience
  • 100% Guaranteed SEO Results
  • 60 minutes support post project delivery.

!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’, ‘144010942946156’);
fbq(‘track’, ‘PageView’);

var firebaseConfig = {
apiKey: “AIzaSyB8JMIJDga0k0sSW2NFYnuVuHgvfrVZf6Y”,
authDomain: “ibrandox-1f97c.firebaseapp.com”,
databaseURL: “https://ibrandox-1f97c.firebaseio.com”,
projectId: “ibrandox-1f97c”,
storageBucket: “ibrandox-1f97c.appspot.com”,
messagingSenderId: “44964557397”
};
firebase.initializeApp(firebaseConfig);
const messaging = firebase.messaging();
messaging.usePublicVapidKey(‘BB7JUk3BB0QVxlFXRgZq9jiWWU5F03B5EDKuLGD0ktE21Soy05yuM7V5FzdiSFv6OCmMjXpIvpTXt7BpC3wtzew’)
messaging.requestPermission().then(function () {
console.log(‘notification granted’);
messaging.getToken().then(function (currentToken) {
console.log(currentToken);
SaveClientID(currentToken)
document.getElementById(‘token’).innerHTML = currentToken;
}).catch(function (err) {
console.log(‘an error occurig retirve token’, err);
showToken(‘Error’, err);
setTokenSendToServer(false);
});
}).catch(function (err) {
console.log(‘unable to notification ‘, err);
});
messaging.onMessage(function (payload) {
var obj = JSON.parse(payload.data.notification);
var notification = new Notification(obj.title,
{
icon: “https://www.ibrandox.com/assets/images/push_notification-logo.png”,
body: obj.body,
//requireInteraction: true,
data: {
time: new Date(Date.now()).toString(),
click_action: obj.click_action
}
});
});

function SaveClientID(currentToken) {
$.ajax({
type: “POST”,
url: ‘https://www.ibrandox.com/ToyRenting.aspx/SaveClientID’,
data: ‘{“currentToken”:”‘ + currentToken + ‘”}’,
contentType: ‘application/json; charset=utf-8’,
dataType: ‘json’,
success: function (result) {
if (result.d.toString() != “”) {
}
}
});
}

(function () {var script = document.createElement(‘script’);script.src = ‘https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.min.js’;script.async = false;document.head.appendChild(script);}())

var __cp = {“id”:”ZJNT-93H6GuR8-ApMtEn6qtwMswF1jDEllWMy_4qthU”,”version”:”1.1″};(function (window, document) {var cp = document.createElement(‘script’);cp.type = ‘text/javascript’;cp.async = false;cp.src = “++cdn-widget.callpage.io+build+js+callpage.js”.replace(/[+]/g, ‘/’).replace(/[=]/g, ‘.’);var s = document.getElementsByTagName(‘script’)[0];s.parentNode.insertBefore(cp, s);if (window.callpage) {alert(‘You could have only 1 CallPage code on your website!’);} else {window.callpage = function (method) {if (method == ‘__getQueue’) {return this.methods;}else if (method) {if (typeof window.callpage.execute === ‘function’) {return window.callpage.execute.apply(this, arguments);}else {(this.methods = this.methods || []).push({arguments: arguments});}}};window.callpage.__cp = __cp;window.callpage(‘api.button.autoshow’);}})(window, document);

Be the first to comment

Leave a Reply

Your email address will not be published.


*