loads the Smart Pixel file asynchronously and controls (enables / disables) the debug mode
smart-pixel.debug.js
for debugging
smart-pixel.min.js
for production / live enviroment
Please save the files "smart-pixel.debug.js" and "smart-pixel.min.js" in the same directory on your server.
Loader script
The Mapp Intelligence JavaScript file should ideally be integrated directly into the header area of the page. Define the domain, path and file in the configuration object "loaderConfig_", which is located in the loader.min.js file.
<html>
<head>
<title>Homepage</title>
<script type="text/javascript" async src="js/loader.min.js"></script>
</head>
<body>
The content of your website is placed here.
</body>
</html>
XML
Node
$ npm i @webtrekk-smart-pixel/core
BASH
For webtrekk-smart-pixel to work in Node, an origin window and document is required.
If you want to activate the debug mode for the Smart Pixel, set the environment variable "NODE_ENV=development".
var webtrekkSmartPixel = require('@webtrekk-smart-pixel/core');
var wtSmart = webtrekkSmartPixel.use(window, window.document);