Events track interactions on your website, such as clicks, scrolls, or other forms of content engagement.
With the server-to-server libraries, your server sends the events, for example after a form submission or another action that your backend processes. JavaScript in the visitor’s browser is not required.
Parameters
Event parameters enrich event data with additional website-specific information or metrics.
They must also be configured in Mapp Q3 before tracking. Find more information here.
When implementing, include the ID number and the value as a string.
Goals
Website goals measure the success of specific actions on your website. They allow you to analyze user behavior and attribute conversions to campaigns.
Goals must be configured before they can be tracked via the library. Find more information here.
When configuring tracking, include the goal ID and the value as a string.
Each goal is considered achieved as soon as a value is tracked, regardless of the actual content of that value.
Note
The predefined goal Order cannot be tracked within the event object.
Avoid submitting values like "no" for goals such as Newsletter Registration, as this would still mark the goal as achieved.
Method | Description | Where to configure * | Where to analyze |
|---|---|---|---|
constructor | Defines the initial event request and can overwrite the default event naming. | – | Navigation > Events |
setName | Defines the unique identification of the event. | – | Navigation > Events |
setParameter | Tracks additional event-specific information or metrics. Follow the syntax guidelines when defining parameters. | EP > Own Configuration | Navigation > Event Parameters > [Name of Parameter] |
setGoal | Tracks website goals that are triggered by events (e.g. registrations or purchases). | EC > Own Configuration | Text: E-Commerce > E-Commerce Parameters > [Name] / Number: Metric |
* Configuration Path Abbreviations:
EP = Mapp Q3 > Configuration > Custom Parameters > Event Parameters > Preconfigured > …
EC = Mapp Q3 > Configuration > Custom Parameters > E-Commerce Parameters > Preconfigured > …
Generated request parameters
Method | Request parameter | Constant |
|---|---|---|
constructor / setName |
|
|
setParameter |
|
|
setGoal |
|
|
Note
Values that are empty or exactly
0,0.0,falseor{}are not transmitted. For example, an event parameter or goal with the value0orfalseis not sent. To transmit such a value, send the request with a parameter map (see Request Parameters).
constructor
/**
* MappIntelligenceAction constructor.
* @param string $name
*/
$actionData = new MappIntelligenceAction($name);Every request also contains a page name: the event is assigned to the page name of a MappIntelligencePage in the same MappIntelligenceDataMap, otherwise to the default page name (see Page).
setName
/**
* @param string $name
* @return $this
*/
$actionData->setName('foo.bar');setParameter
/**
* @param int $id
* @param string $value
* @return $this
*/
$actionData->setParameter($id, $value);setGoal
/**
* @param int $id
* @param string $value
* @return $this
*/
$actionData->setGoal($id, $value);Goals are sent as E-Commerce Parameters (cb<ID>). Event goals, page goals, order parameters and product parameters share these IDs: if several of them use the same ID in one request, only one value is sent.
$actionData = new MappIntelligenceAction();
$actionData
->setName('foo.bar')
->setParameter(2, 'param2')
->setParameter(15, 'param15')
->setGoal(2, 'goal2')
->setGoal(15, 'goal15');
$mappIntelligence = MappIntelligence::getInstance();
$mappIntelligence->track((new MappIntelligenceDataMap())->action($actionData));