(function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); (function ($) { function initGaTracking(isp, org) { isp = isp || '(not set)'; org = org || '(not set)'; $.each(trackingCodes, function (i, data) { if (data.qualifier === "Q4") { ga('create', data.trackingCode, 'auto'); // Q4 tracker ga('set', { 'dimension1': isp }); ga('set', { 'dimension2': org }); ga('set', 'anonymizeIp', true); ga('send', 'pageview', { 'page': location.pathname + location.search + location.hash }); // send pageview to Q4 tracker } else { ga('create', data.trackingCode, 'auto', { 'name': data.qualifier }); // Client tracker ga(data.qualifier + '.set', 'anonymizeIp', true); ga(data.qualifier + '.send', 'pageview', { 'page': location.pathname + location.search + location.hash }); // send pageview to Client tracker } }); } var trackingCodes = [{qualifier: 'Q4', trackingCode: 'UA-124185315-30'}, {qualifier: 'Client', trackingCode: 'UA-125336113-1'}]; var ipSessStorageKey = 'ipApiInfo'; var ipJsonStringified = sessionStorage.getItem(ipSessStorageKey); if (ipJsonStringified) { try { var ipJsonParsed = JSON.parse(ipJsonStringified); initGaTracking(ipJsonParsed.isp, ipJsonParsed.org); } catch (e) { console.error('Failed to JSON parse IP API session storage data\n', e); initGaTracking(); } } else { $.getJSON('https://pro.ip-api.com/json/?key=xdjZbj0ZiVVozCo&fields=isp,org') .done(function (ipJson) { sessionStorage.setItem(ipSessStorageKey, JSON.stringify(ipJson)); initGaTracking(ipJson.isp, ipJson.org); }) .fail(function () { initGaTracking(); }); } })(jQuery);
Contact Us

sakshi@privacy4cars.com

Home/Sakshi Dwivedi
Go to Top