$(document).ready(function(){ console.log('WW Tracking Embed"); $('a').each(function (e) { if (typeof $(this).attr('href') !== 'undefined' && $(this).attr('href').indexOf('woolworths.com.au') !== -1) { $(this).click(function () { wixWindow.trackEvent("CustomEvent", { "event": "Shop via Woolworths", "eventCategory": "Shop via Woolworths", "eventAction": "Shop via Woolworths" }); }); } }); });