--- title: "Send Tracking Data" slug: "track" updated: 2025-03-28T16:32:56Z published: 2025-03-28T16:32:56Z canonical: "docs.mapp.com/track" --- > ## 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. # Send Tracking Data ## 1 Overview This step sends the collected tracking data to the Mapp Intelligence servers. It’s a core part of the tracking process and must follow the initialization and configuration of data. Once the request is sent, the data is automatically cleared from the cache. If you need to retain the data (e.g., for single-page applications), you can keep it in memory by passing true as an argument. In this case, the data must be manually removed later using .remove(). > [!NOTE] > **Important:** Tracking only works if the script is wrapped in the [Smart Pixel’s push() function](/v1/docs/push). --- ## 2 Available Methods The Smart Pixel provides the following methods to send tracking requests: | Method | Description | | --- | --- | | `track()` | Sends all tracking data and clears it from the internal cache by default. | | `trackPage()` | Forces a page request (page view). | | `trackAction()` | Forces an event or interaction request. | Each method accepts an optional `keepData` parameter (boolean) to decide whether the data should be retained after sending. --- ### 2.1 Method Details track()trackPage()trackAction() ```javascript /** * @param {boolean=false} [keepData] */ wtSmart.track(keepData); ``` ```javascript /** * @param {boolean=false} [keepData] */ wtSmart.trackPage(keepData); ``` ```javascript /** * @param {boolean=false} [keepData] */ wtSmart.trackAction(keepData); ``` **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 the request wtSmart.track(); // send tracking data and keep data wtSmart.track(true); }); ``` --- ## 3 Code Generator Use the code generator to create tracking configurations that can be directly embedded into your website. [Embedded content](https://static.webtrekk.com/pixel/wtsmart-gui/track/?nohelp=1)