Since version 3.2.x of the Mapp Intelligence tracking script, the use of this plugin is supported. The plugin includes all JavaScript functions that are transferred to the Mapp Intelligence pixel.

Select the appropriate method for implementation: On the one hand, you can integrate the provided plugin as JavaScript directly on your Web page (for example, with a single page application) or you can implement the plugin using Mapp Tag Integration.

The integration process comprises the following steps:

  • Integrating the plugin
  • Configuring the plugin
  • Activating the plugin

Implementation Methods

  1. Open the container to which you want to add the plugin.
  2. Click Add plugin. You will be forwarded to the overview of all available plugins.
     

  3. Select the URL Campaign Mapper plugin by clicking on the corresponding button. The plugin configuration dialog opens.
  4. Click + Configuration to add a new configuration.
     

  5. Make the following settings:

    ParameterDescription
    Media CodeDefine the media code that you want to enter as a Mapp Intelligence campaign. You must set this as the campaign channel in the marketing configuration.
    ParameterSpecify a semicolon-separated list of URL parameters from which the media code value is to be generated. The order of the parameters determines the composition of the media code. The order of the parameters within the URL is not relevant.
    SeparatorEnter the separator between the individual values. To automatically transfer the different values to the Mapp Intelligence campaign levels, use a dot here.
    Generate campaign when all parameters are present

    Active = A campaign will only be generated if all defined URL parameters are found.

    Deactive = A campaign is also generated if only individual parameters are available. This means that a campaign parameter is generated in the third definition ("wt_camp") even if, for example, only a, b and f are appended to the URL. The parameter would look like this: "wt.campaignId="[a].[b]...[f]".

    Using the points (".") ensures that the campaign values can be placed correctly in the corresponding campaign channels.

    Filtering out URL parameter fragmentsWith this parameter, you can remove certain parts from the URL parameters and replace them with another string.
    Replacing the URL parameter fragments

    Enter a string to replace the located term.

    Example

    You can replace all "." with "_". This is helpful if, for example, "." already exists in the URL parameters but you need to replace them because the configured campaign structure is different.

    • Original URL parameters
      index.html?abc=1.2.3&def=456&ghi=789&jkl=012

    • Pixel parameter generated by the plugin
      wt_mc%3D1_2_3.456.789.012
  6. Click Next to add rules.

  7. Click Add plugin. The plugin is added to the container.

  8. In the last step, click Publish.

Follow these steps to integrate the plugin:

  1. First, download the JavaScript file.

  2. On your website, insert the downloaded script before the script "webtrekk_v4.min.js".

    Example

    <script type="text/javascript" src="path/to/file/webtrekk_urlCampaignMapper.min.js"></script>
    <script type="text/javascript" src="path/to/file/webtrekk_v4.min.js"></script>
    XML
  3. In the integrated script ("webtrekk_urlCampaignMapper.min.js"), you will find the configuration array urlCampaignMapper in which you define your necessary information.
    You can define several configurations. These are processed in the specified order. The first applicable definition is used, following definitions are ignored. Each configuration object is made up as follows:

    Example

    window.wt_urlCampaignMapper = function(conf) {
        if (conf.mode === "page" && conf.type === "before" && conf.requestCounter === 1) {
            var urlCampaignMapper = [
                {
                    "parameter": "abc;def;ghi;jkl",
                    "separator": ".",
                    "mediaCode": "wt_mc",
                    "replacerValue": ".",
                    "findAllParameter": true,
                    "replacerRegExp": "_"
                },
                {
                    "parameter": "mno;pqr;stu;vwx",
                    "separator": ".",
                    "mediaCode": "wt_cc"
                },
                {
                    "parameter": "a;b;c;d;e;f",
                    "separator": ".",
                    "mediaCode": "wt_camp"
                }
            ];
    JS
    ParameterDescription
    parameterSpecify a semicolon-separated list of URL parameters from which the media code value is to be generated. The order of the parameters determines the composition of the media code. The order of the parameters within the URL is not relevant.
    separatorEnter the separator between the individual values. To automatically transfer the different values to the Mapp Intelligence campaign levels, use a dot here.
    mediaCodeDefine the media code that you want to enter as a Mapp Intelligence campaign. You must set this as the campaign channel in the Mapp Q3 marketing configuration.
    replacerRegExp

    With this parameter, you can remove certain parts from the URL parameters and replace them with another string (see "replacerValue").

    replacerValue

    Enter a string to replace the located term.

    Example

    You can replace all "." with "_". This is helpful if, for example, "." already exists in the URL parameters but you need to replace them because the configured campaign structure is different.

    • Original URL parameters
      index.html?abc=1.2.3&def=456&ghi=789&jkl=012

    • Pixel parameter generated by the plugin
      wt_mc%3D1_2_3.456.789.012

    findAllParameter

    true = A campaign will only be generated if all defined URL parameters are found.

    false = A campaign is also generated if only individual parameters are available. This means that a campaign parameter is generated in the third definition ("wt_camp") even if, for example, only a, b and f are appended to the URL. The parameter would look like this: "wt.campaignId="[a].[b]...[f]".

    Using the points (".") ensures that the campaign values can be placed correctly in the corresponding campaign channels.

  4. First, store the configured function wt_urlCampaignMapper or the script file globally so that it can be found under the object "window".
    You can use the parameter "executePluginFunction" in the tracking pixel to activate the plugin functionality. This can be set either in the configuration variable (webtrekkConfig) or as a parameter of the pixel object.

    If you want to measure the data on all your pages, we recommend the global integration. The page-specific configuration is used for the measurement of individual pages. Mapp recommends the integration on all pages.

    Example global configuration

    var webtrekkConfig = {
    	trackId: "111111111111111",
    	trackDomain: "track.mapp.net",
    	domain: "www.domain.tld",
    	executePluginFunction: "wt_urlCampaignMapper"
    };
    JS

    Example page-specific configuration

    var wt = new webtrekkV3();
    wt.contentId = "en.home";
    wt.executePluginFunction = "wt_urlCampaignMapper";
    wt.sendinfo();
    JS

The data collection is started as soon as the plugin is activated.