One of the biggest advantages of obtaining a Dubai Mainland License is the freedom to conduct business anywhere—across the UAE, in free zones, and internationally.
Enhanced Market Presence.
A DED Mainland License allows you to establish your business anywhere in the UAE, boosting your presence and offering the flexibility to expand branches throughout the country.
Authorization to Collaborate with Government Entities.
Mainland-licensed companies can secure government contracts, gaining access to lucrative multi-million dirham projects with high risk and high reward potential.
Freedom From Currency Restrictions.
There are no currency restrictions under the Dubai Mainland License. Companies are entitled to fully repatriate offshore or onshore bank accounts in the UAE.
No Visa Limitations
UAE mainland companies can freely expand their visa quotas, requiring additional space only at a certain stage, making business growth more seamless.
Financial Viability
Dubai Mainland License holders enjoy Free Zone benefits, including tax exemptions and no minimum capital requirements for company setup.
)
* OR add via a plugin like "Insert Headers and Footers" / "WPCode"
* OR paste into GTM as a Custom HTML tag (fire on All Pages)
*
* This script handles:
* 1. Google Ads conversion tracking (form submit, WhatsApp, phone, email)
* 2. GA4 event tracking
* 3. Meta Pixel Lead events
* 4. GCLID capture & storage
* 5. UTM parameter capture & storage
* 6. WhatsApp click tracking
* 7. Phone call click tracking
* 8. Email click tracking
* 9. Form submission tracking (WPForms)
* 10. TikTok Pixel (ready when you have the ID)
*/
(function() {
'use strict';
// ============================================
// CONFIG — All tracking IDs in one place
// ============================================
var CONFIG = {
GOOGLE_ADS_ID: 'AW-16878065148',
GA4_ID: 'G-RLPNNHRM3X',
META_PIXEL_ID: '1283318260204716',
TIKTOK_PIXEL_ID: '', // Add when ready
// Google Ads Conversion Labels
CONV_FORM_SUBMIT: 'AW-16878065148/y8dTCMyW-JcbEPyri_A-',
CONV_PHONE_CLICK: 'AW-16878065148/cgVWCPzz-JcbEPyri_A-',
CONV_WHATSAPP_CLICK: 'AW-16878065148/yeCnCNK-spgbEPyri_A-',
CONV_EMAIL_CLICK: 'AW-16878065148/e3JXCP-yipgbEPyri_A-',
CONV_PAGE_VIEW: 'AW-16878065148/h1SHCJ-d-ZcbEPyri_A-',
// Conversion values (AED)
VALUE_FORM: 50,
VALUE_WHATSAPP: 40,
VALUE_PHONE: 30,
VALUE_EMAIL: 10,
COOKIE_DAYS: 90 // How long to store GCLID/UTM
};
// ============================================
// 1. GOOGLE ADS GTAG SETUP
// ============================================
// Load gtag.js if not already loaded
if (!window.gtag) {
var gtagScript = document.createElement('script');
gtagScript.async = true;
gtagScript.src = 'https://www.googletagmanager.com/gtag/js?id=' + CONFIG.GA4_ID;
document.head.appendChild(gtagScript);
window.dataLayer = window.dataLayer || [];
window.gtag = function() { dataLayer.push(arguments); };
gtag('js', new Date());
}
// Configure GA4
gtag('config', CONFIG.GA4_ID, {
send_page_view: true
});
// Configure Google Ads — THIS IS WHAT WAS MISSING
gtag('config', CONFIG.GOOGLE_ADS_ID);
// ============================================
// 2. GCLID CAPTURE & STORAGE
// ============================================
function getUrlParam(param) {
var match = window.location.search.match(new RegExp('[?&]' + param + '=([^&]*)'));
return match ? decodeURIComponent(match[1]) : null;
}
function setCookie(name, value, days) {
var d = new Date();
d.setTime(d.getTime() + (days * 24 * 60 * 60 * 1000));
document.cookie = name + '=' + encodeURIComponent(value) +
';expires=' + d.toUTCString() +
';path=/;SameSite=Lax';
}
function getCookie(name) {
var match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
return match ? decodeURIComponent(match[2]) : null;
}
// Capture GCLID
var gclid = getUrlParam('gclid');
if (gclid) {
setCookie('_nc_gclid', gclid, CONFIG.COOKIE_DAYS);
setCookie('_nc_gclid_time', new Date().toISOString(), CONFIG.COOKIE_DAYS);
}
// Capture FBCLID
var fbclid = getUrlParam('fbclid');
if (fbclid) {
setCookie('_nc_fbclid', fbclid, CONFIG.COOKIE_DAYS);
}
// Capture TTCLID (TikTok)
var ttclid = getUrlParam('ttclid');
if (ttclid) {
setCookie('_nc_ttclid', ttclid, CONFIG.COOKIE_DAYS);
}
// ============================================
// 3. UTM PARAMETER CAPTURE & STORAGE
// ============================================
var utmParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'];
utmParams.forEach(function(param) {
var value = getUrlParam(param);
if (value) {
setCookie('_nc_' + param, value, CONFIG.COOKIE_DAYS);
}
});
// ============================================
// 4. INJECT HIDDEN FIELDS INTO ALL FORMS
// ============================================
function injectHiddenFields() {
var forms = document.querySelectorAll('form');
forms.forEach(function(form) {
// Skip if already injected
if (form.querySelector('[name="nc_gclid"]')) return;
var fields = [
{ name: 'nc_gclid', value: getCookie('_nc_gclid') || '' },
{ name: 'nc_fbclid', value: getCookie('_nc_fbclid') || '' },
{ name: 'nc_ttclid', value: getCookie('_nc_ttclid') || '' },
{ name: 'nc_utm_source', value: getCookie('_nc_utm_source') || '' },
{ name: 'nc_utm_medium', value: getCookie('_nc_utm_medium') || '' },
{ name: 'nc_utm_campaign', value: getCookie('_nc_utm_campaign') || '' },
{ name: 'nc_utm_content', value: getCookie('_nc_utm_content') || '' },
{ name: 'nc_utm_term', value: getCookie('_nc_utm_term') || '' },
{ name: 'nc_landing_page', value: getCookie('_nc_landing') || window.location.pathname },
{ name: 'nc_referrer', value: document.referrer || '' }
];
fields.forEach(function(field) {
var input = document.createElement('input');
input.type = 'hidden';
input.name = field.name;
input.value = field.value;
form.appendChild(input);
});
});
}
// Store landing page on first visit
if (!getCookie('_nc_landing')) {
setCookie('_nc_landing', window.location.pathname + window.location.search, CONFIG.COOKIE_DAYS);
}
// ============================================
// 5. FORM SUBMISSION TRACKING (WPForms)
// ============================================
function trackFormSubmit(formData) {
console.log('[Noble Core Tracking] Form submitted');
// Google Ads Conversion
gtag('event', 'conversion', {
'send_to': CONFIG.CONV_FORM_SUBMIT,
'value': CONFIG.VALUE_FORM,
'currency': 'AED'
});
// GA4 Event
gtag('event', 'generate_lead', {
'event_category': 'form',
'event_label': 'contact_form',
'value': CONFIG.VALUE_FORM,
'currency': 'AED'
});
// Meta Pixel Lead Event
if (window.fbq) {
fbq('track', 'Lead', {
value: CONFIG.VALUE_FORM,
currency: 'AED',
content_name: 'Contact Form'
});
}
// TikTok Pixel
if (window.ttq) {
ttq.track('SubmitForm', {
value: CONFIG.VALUE_FORM,
currency: 'AED'
});
}
// Push to dataLayer for GTM
window.dataLayer = window.dataLayer || [];
dataLayer.push({
'event': 'form_submit',
'form_type': 'contact',
'gclid': getCookie('_nc_gclid') || '',
'utm_source': getCookie('_nc_utm_source') || '',
'conversion_value': CONFIG.VALUE_FORM
});
}
// Listen for WPForms submission
document.addEventListener('wpformsAjaxSubmitSuccess', function(e) {
trackFormSubmit(e.detail || {});
});
// Fallback: Listen for any form submit event
document.addEventListener('submit', function(e) {
var form = e.target;
if (form && form.classList.contains('wpforms-form')) {
// WPForms AJAX will handle it via the event above
return;
}
// Track non-WPForms submissions
trackFormSubmit({});
});
// ============================================
// 6. WHATSAPP CLICK TRACKING
// ============================================
function trackWhatsAppClick(url) {
console.log('[Noble Core Tracking] WhatsApp click:', url);
// Google Ads Conversion
gtag('event', 'conversion', {
'send_to': CONFIG.CONV_WHATSAPP_CLICK,
'value': CONFIG.VALUE_WHATSAPP,
'currency': 'AED'
});
// GA4 Event
gtag('event', 'whatsapp_click', {
'event_category': 'engagement',
'event_label': url,
'value': CONFIG.VALUE_WHATSAPP
});
// Meta Pixel
if (window.fbq) {
fbq('track', 'Contact', {
value: CONFIG.VALUE_WHATSAPP,
currency: 'AED',
content_name: 'WhatsApp Click'
});
}
// TikTok
if (window.ttq) {
ttq.track('Contact', { value: CONFIG.VALUE_WHATSAPP, currency: 'AED' });
}
// DataLayer
dataLayer.push({
'event': 'whatsapp_click',
'click_url': url,
'gclid': getCookie('_nc_gclid') || ''
});
}
// ============================================
// 7. PHONE CALL CLICK TRACKING
// ============================================
function trackPhoneClick(number) {
console.log('[Noble Core Tracking] Phone click:', number);
gtag('event', 'conversion', {
'send_to': CONFIG.CONV_PHONE_CLICK,
'value': CONFIG.VALUE_PHONE,
'currency': 'AED'
});
gtag('event', 'phone_click', {
'event_category': 'engagement',
'event_label': number,
'value': CONFIG.VALUE_PHONE
});
if (window.fbq) {
fbq('track', 'Contact', {
value: CONFIG.VALUE_PHONE,
currency: 'AED',
content_name: 'Phone Call: ' + number
});
}
if (window.ttq) {
ttq.track('Contact', { value: CONFIG.VALUE_PHONE, currency: 'AED' });
}
dataLayer.push({
'event': 'phone_click',
'phone_number': number,
'gclid': getCookie('_nc_gclid') || ''
});
}
// ============================================
// 8. EMAIL CLICK TRACKING
// ============================================
function trackEmailClick(email) {
console.log('[Noble Core Tracking] Email click:', email);
gtag('event', 'conversion', {
'send_to': CONFIG.CONV_EMAIL_CLICK,
'value': CONFIG.VALUE_EMAIL,
'currency': 'AED'
});
gtag('event', 'email_click', {
'event_category': 'engagement',
'event_label': email
});
if (window.fbq) {
fbq('trackCustom', 'EmailClick', { email: email });
}
dataLayer.push({ 'event': 'email_click', 'email': email });
}
// ============================================
// 9. LINK CLICK LISTENER (WhatsApp, Phone, Email)
// ============================================
document.addEventListener('click', function(e) {
var link = e.target.closest('a');
if (!link) return;
var href = link.getAttribute('href') || '';
// WhatsApp links
if (href.indexOf('wa.me') !== -1 ||
href.indexOf('whatsapp.com') !== -1 ||
href.indexOf('wa.aisensy') !== -1 ||
href.indexOf('api.whatsapp.com') !== -1) {
trackWhatsAppClick(href);
}
// Phone links
if (href.indexOf('tel:') === 0) {
var number = href.replace('tel:', '').replace(/\s/g, '');
trackPhoneClick(number);
}
// Email links
if (href.indexOf('mailto:') === 0) {
var email = href.replace('mailto:', '').split('?')[0];
trackEmailClick(email);
}
});
// ============================================
// 10. TIKTOK PIXEL (Ready for activation)
// ============================================
if (CONFIG.TIKTOK_PIXEL_ID) {
!function (w, d, t) {
w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"];ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i