init
    • 1 Minute to read
    • Dark
      Light

    init

    • Dark
      Light

    Article summary

    Overview

    Value

    Description

    Data type

    Default value

    Required

    trackId

    Enter your Track ID here. It is under Mapp Q3 >Configuration > System Configuration > Data Collection.

    If the request should be sent to several accounts, you can add multiple Track IDs separated by a comma.

    String


    Yes

    trackDomain

    Enter the domain to which the data should be sent. If you are using a Mapp Intelligence track domain, you will find it in the setup information sent to you via email.

    String


    Yes

    domain

    Decide which domains are excluded from the referrer analysis. By default, the domain where the Smart Pixel is located is excluded. You can override this setting and add (sub)domains.


    (e.g., payment providers, etc.). Enter as a comma-separated list of domains and subdomains. You can use regular expressions and wildcards ( *).

    Always enter the domains without "http://" and "https://"

    String

    location.host

    -

    cookie

    Decide how Mapp Intelligence sets cookies to recognize a (returning) user. You can choose whether to set the cookie via the browser or the server.

    1: First-Party Tracking
    3: Third-Party Tracking

    Find more details below.

    String

    1

    -

    Further information

    cookie

    When using first-party cookies, your website will set all cookies client-side. With third-party cookies, Mapp Intelligence sets the cookie server-side.

    Acceptance of first-party cookies is generally higher than for third-party cookies. The disadvantage of first-party cookies is that they only are valid for one domain. Hence, when you use them, visits on websites distributed across multiple domains (e.g., www.website.com and www.website-special.com) cannot be tracked as a continuous visit. Tracking switches between sub-domains (e.g., www1.website.com and www2.website.com) or HTTP/HTTPS are supported.

    We only recommend using server-side cookies if you use a custom Track Domain and the Track Domain is the same as your web domain. This allows first-party tracking and the highest data quality.

    import { Component } from '@angular/core';
    import { WebtrekkSmartPixelAngular } from '@webtrekk-smart-pixel/angular';
    
    @Component({
        template: `<div>[ ... ]</div>`
    })
    export class ExampleComponent {
        constructor(private pixel: WebtrekkSmartPixelAngular) {
            this.pixel.init({
                trackId: '111111111111111',
                trackDomain: 'analytics01.wt-eu02.net',
                domain: 'sub.domain.tld',
                cookie: '1'
            });
        }
    }

    Please add WebtrekkSmartPixelModule to your root NgModule and configure the options before using directives.

    import { Component } from '@angular/core';
    
    @Component({
        template: `<div [wt-init-data]="webtrekkData"></div>`
    })
    export class ExampleComponent {
        webtrekkData = {
            trackId: '123451234512345',
            trackDomain: 'analytics01.webtrekk.net',
            domain: 'sub.domain.tld',
            cookie: '1'
        }
    }


    Was this article helpful?

    What's Next