--- title: "Using the Push Function" slug: "push" updated: 2025-03-28T16:32:20Z published: 2025-03-28T16:32:20Z canonical: "docs.mapp.com/push" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Using the Push Function ## 1 Overview The Smart Pixel is loaded asynchronously to avoid blocking the page load. Because of this, any tracking method (such as init.set() or track()) must be executed only after the script has fully loaded. To ensure this, Mapp Intelligence uses the wtSmart.push() function. It ensures that all tracking-related code runs only when the Smart Pixel is ready. We strongly recommend using this function for all tracking calls. If the Smart Pixel script isn’t loaded — for example, due to browser extensions or network issues — calling tracking functions directly may trigger JavaScript errors and disrupt parts of your website. Using wtSmart.push() not only ensures correct tracking execution — it also prevents potential JavaScript errors that could affect your website’s stability. --- ## 2 Syntax ```javascript /** * @param {function(wtSmart)} fn */ wtSmart.push(fn); ``` **Example** ```javascript window.wtSmart = window.wtSmart || []; window.wtSmart.push(function(wtSmart) {    // set initial tracking config    wtSmart.init.set({        trackId: '111111111111111',        trackDomain: 'q3.webtrekk.net'    });        // set page data    wtSmart.page.data.set('en.index.home');        // send tracking data and remove data after request    wtSmart.track(); }); ```