Webtrekk / Mapp is a tracking service which supports tracking events (actions, views and purchases) as well as user-attributes.

Events

Overview

Key-Name in Config

Actions: Templates

Actions: Custom Parameters

Views: Templates

Views: Custom Parameters

Purchases: Templates

Purchases: Custom Parameters

Attribute Templates

mapp

  • name
  • event_param_NNN
  • name
  • page_param_NNN
  • page_category_NNN
  • page_search
  • name
  • product_name
  • event_param_NNN
  • product_category_NNN
  • ecommerce_custom_param_NNN
  • id


Templates in bold are required. N stands for digits.

Actions

Templates

The name of the action can be specified using the name template.

Custom parameters

Action events can include additional values. They are numbered in Mapp / Webtrekk and can be send using the custom parameter event_param_NNN.

Example: A event param for the issue name configured in Mapp has the ID 5. To use this parameter for the APP_BOOKMARK_ADDED action you have to configure the event like this:

{
  "mapp": {
    "eventsEnabledByDefault": true,
    "viewsEnabledByDefault": true,
    "purchasesEnabledByDefault": true,
    "attributesEnabledByDefault": true,
    "events": {
      "APP_BOOKMARK_ADDED": {
        "templates": {
          "name": "Bookmark added"
        },
        "parameters": {
          "event_param_5": "{{ISSUE_NAME}}"
        }
      }
    }
  }
}

Views

Templates

The name of the view can be specified using the name template.

Custom parameters

Action events can include additional values:

Parameter with prefixes use numbered IDs in Mapp / Webtrekk. 

Example: A page param for the issue name configured in Mapp has the ID 3. To use this parameter for the ARTICLE_CONTENT view you have to configure the event like this:

{
  "mapp": {
    "eventsEnabledByDefault": true,
    "viewsEnabledByDefault": true,
    "purchasesEnabledByDefault": true,
    "attributesEnabledByDefault": true,
    "views": {
      "ARTICLE_CONTENT": {
        "templates": {
          "name": "Article content"
        },
        "parameters": {
          "page_param_3": "{{ISSUE_NAME}}"
        }
      }
    }
  }
}

Purchases

Templates

The name of the event can be specified using the name template.

Additionally, for purchases, the product name can optinally be configured using the product_name template. If not provided it will be set to the products identifier (SKU/Product ID) from the store.

Custom parameters

Purchase events can include additional values:

Parameter with prefixes use numbered IDs in Mapp / Webtrekk. 

Example: A custom parameter for the issue name configured in Mapp has the ID 6. To use this parameter for the STOREFRONT_ISSUE_PURCHASED action you have to configure the event like this:

{
  "mapp": {
    "eventsEnabledByDefault": true,
    "viewsEnabledByDefault": true,
    "purchasesEnabledByDefault": true,
    "attributesEnabledByDefault": true,
    "purchases": {
      "STOREFRONT_ISSUE_PURCHASED": {
        "templates": {
          "name": "Issue purchased",
          "product_name": "{{ISSUE_NAME}}"
        },
        "parameters": {
          "event_param_6": "{{ISSUE_NAME}}"
        }
      }
    }
  }
}

User Attributes

User attributes are sent as additional session parameters to Webtrekk / Mapp. As with custom parameters, session parameters are numbered IDs and can be configured using the id template.

Values will be converted to strings. Attributes will be cached locally (in-memory) and sent with each event / page view.

Example:

{
  "mapp": {
    "eventsEnabledByDefault": true,
    "viewsEnabledByDefault": true,
    "purchasesEnabledByDefault": true,
    "attributesEnabledByDefault": true,
    "attributes": {
      "HAS_ACTIVE_SUBSCRIPTION": {
        "templates": {
          "id": "1"
        }
      },
      "HAS_ACTIVE_SUBSCRIPTION_CODE": {
        "templates": {
          "id": "2"
        }
      }
    }
  }
}

Full configuration example


{
  "mapp": {
    "eventsEnabledByDefault": true,
    "viewsEnabledByDefault": true,
    "purchasesEnabledByDefault": true,
    "attributesEnabledByDefault": true,
    "events": {
      "APP_BOOKMARK_ADDED": {
        "templates": {
          "name": "Bookmark added"
        },
        "parameters": {
          "event_param_1": "{{ISSUE_ID}}",
          "event_param_2": "{{ISSUE_NAME}}"
        }
      },
      "APP_BOOKMARK_DELETED": {
        "templates": {
          "name": "Bookmark deleted"
        },
        "parameters": {
          "event_param_1": "{{ISSUE_ID}}",
          "event_param_2": "{{ISSUE_NAME}}"
        }
      }
    },
    "views": {
      "ARTICLE_CONTENT": {
        "templates": {
          "name": "Article content"
        },
        "parameters": {
          "page_param_1": "{{ISSUE_ID}}",
          "page_param_2": "{{ISSUE_NAME}}",
          "page_category_1": "{{PUBLICATION_NAME}}"
        }
      }
    },
    "purchases": {
      "STOREFRONT_ISSUE_PURCHASED": {
        "templates": {
          "name": "Issue purchased",
          "product_name": "{{PRODUCT_ID}}"
        },
        "parameters": {
          "product_category_1": "{{PUBLICATION_NAME}}",
          "ecommerce_custom_param_1": "Custom param 1",
          "event_param_1": "{{ISSUE_ID}}",
          "event_param_2": "{{ISSUE_NAME}}"
        }
      }
    },
    "attributes": {
      "HAS_ACTIVE_SUBSCRIPTION": {
        "templates": {
          "id": "1"
        }
      },
      "HAS_ACTIVE_SUBSCRIPTION_CODE": {
        "templates": {
          "id": "2"
        }
      }
    }
  }
}