Integration

Download

You can find the package on our Github page.

Browser

The Acquire extension file should ideally be integrated directly into the header area of the page after the Smart Pixel.

<html>
    <head>
        <title>Homepage</title>
        <script type="text/javascript" async src="js/smart-pixel-loader.min.js"></script>
        <script type="text/javascript" async src="js/smart-pixel-acquire.min.js"></script>
    </head>
    <body>
        The content of your website is placed here.
    </body>
</html>
XML

RequireJS

requirejs(['wtSmart', 'wtSmartAcquire'], function(wtSmart, wtSmartAcquire) {
    window.wtSmart = window.wtSmart ? window.wtSmart : wtSmart.use(window, window.document);
    window.wtSmart.push(wtSmartAcquire);
     
    // do tracking stuff here
});
JS

Methods and properties

name

Get the name of the extension.

/**
 * @type {string}
 */
wtSmart.extension.acquire.name;
JS

version

Get the version of the extension. 

/**
 * @type {string}
 */
wtSmart.extension.acquire.name;
JS

config

Set and get the current configuration of the extension. 

  • id: Your pixel identifier ID as given in the Acquire system.
  • m: Your Mapp Acquire customer ID.

You can find the information in your pixel generated in Mapp Acquire, for example:

<script>...("https://c.flx1.com/101-23527.js?id=25137&m=425")</script>
XML
/**
 * @param {{
 *      id: string|number,
 *      m: string|number
 * }} [config]
 *
 * @returns {object}
 */
wtSmart.extension.acquire.config(config);
JS

isActivated

Get the status, if the extension is enabled. 

/**
 * @returns {boolean}
 */
wtSmart.extension.acquire.isActivated();
JS

activate

Activate the extension. 

wtSmart.extension.acquire.activate();
JS

deactivate

Deactivate the extension. 

wtSmart.extension.acquire.deactivate();
JS

Example

// is acquire activated
var isActivated = wtSmart.extension.acquire.isActivated();
 
// set acquire config
wtSmart.extension.acquire.config({
    id: '22377',
    m: '103'
});
 
// get acquire config
var acquireConfig = wtSmart.extension.acquire.config();
 
// activate acquire
wtSmart.extension.acquire.activate();
 
// deactivate acquire
wtSmart.extension.acquire.deactivate();
JS