The track method sends the collected data to our track servers. After sending, the pixel automatically deletes all data from the cache and cannot access it anymore.

If you want to keep the data accessible, set "true" as the first argument. This might be especially relevant for tracking single page applications. When keeping data, you need to remove the data you do not need anymore manually.

/**
 * @param {boolean=false} [keepData]
 */
wtSmart.track(keepData);
JS


With the method trackPage and trackAction you can force a page or action request.

/**
 * @param {boolean=false} [keepData]
 */
wtSmart.trackPage(keepData);
JS
/**
 * @param {boolean=false} [keepData]
 */
wtSmart.trackAction(keepData);
JS

Example

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);
});
JS