This library will help you set up server-side tracking when using Mapp Intelligence as your analysis tool. Server-side tracking is vital if you need to measure mission-critical information on your website, such as order information. 

Basic Information

The @mapp-intelligence/node is a Node.js client for Mapp Intelligence.The basis for data collection on your server is implementing the respective library. Mapp Intelligence tracking library provides scripts to track user behavior and technical information, such as user agents. In addition to the standard data collection, the tracking library offers many options to customize tracking based on specific use cases. Typical use cases are product, order, and shipment tracking, or the tracking of application processes.

Use Cases: Server-Side Tracking

Pure Server-Side Tracking

This solution requires the use of Node.js library as the only source of data collection. Note that this solution prevents any client-side actions from being tracked; such as action, form, or media requests. Especially customers with high data protection and security requirements benefit from pure server-side tracking. The tracking script is saved on your own servers and sends to the tracking server from there.

Key Features of Server-Side Tracking

  • All consumer methods are supported and can be used based on the specific requirements.
  • You need to ensure to pass a unique identification of each user to the library to receive correct analyses in the dashboards. This can either be done via the getUserIdCookie() function or by creating a unique ID yourself.
  • All track requests are sent to the track server, the library does not rely on browser and cookie permissions.

Pure server-side tracking or the use of the server-side library to track all page requests might affect the number of page impressions if one of the following conditions is true:

  • Preloading of pages in search results: Some browsers (for example, Safari, Google Chrome) preload a website in the background when appearing in search results. Since this will create a call on the server, a page impression will be created, which might lead to increased page impressions and bounce rates (if the user did not visit the website after all), and decreased page and visit duration time.
  • Caching of pages: If you are caching the websites in the browser to increase performance, a page impression might not be tracked if the cache in the browser prevents a call to the server. This might decrease overall page impressions and affect previous and follower pages in the path analysis.

Configuration recommendation

const config = new MappIntelligenceConfig()
	.setTrackDomain("analytics01.wt-eu02.net")
	.setTrackId("111111111111111")
	.setConsumerType(MappIntelligenceConsumerType.FILE)
	.setForceSSL(true);
JS

Hybrid Tracking: Server Library and Pixel

You can have the best of the two worlds by using both the pixel and server library. With this setup you could, for example, track all actions, forms, or media via the pixel, but page-related information is tracked using the Node.js library.

Key Features of Hybrid Tracking

  • Both the pixel and the Node.js library are used to collect data.
  • Customers do not need to set up a custom track domain as the requests are sent to the customer's servers.
  • To ensure the correct processing of the data, customers must send the pixel requests to the server library and use the file consumer to send tracking data to the track server.
you need to ensure the pixel requests are sent to their own server. The file consumer must also be used to send the requests alongside the server-side created requests to the track server.

Configuration recommendation

const config = new MappIntelligenceConfig()
	.setTrackDomain("analytics01.wt-eu02.net")
	.setTrackId("111111111111111")
	.setConsumerType(MappIntelligenceConsumerType.FILE)
	.setForceSSL(true);
JS

Server-Side Tracking for Mission-Critical Information

It's also possible to use the server-side library to collect data that's critical for success, but use the pixel for less critical information. Critical information can include order and shipping information, or application confirmation.

Key Features of Server-Side Tracking for Mission-Critical Information

  • The pixel can send the requests directly to the track server and not to the customer's server.
  • The customer's server does not need to handle as much load as it does in the other use cases mentioned above.
  • http client consumer must be used on the server-side library.
The server-side library needs to send the incoming requests immediately to the tracking server to ensure correct processing of the tracking data in Intelligence.

Configuration recommendation

const config = new MappIntelligenceConfig()
	.setTrackDomain("analytics01.wt-eu02.net")
	.setTrackId("111111111111111")
	.setConsumerType(MappIntelligenceConsumerType.HTTP_CLIENT)
	.setMaxAttempt(3)
	.setAttemptTimeout(100)
	.setMaxBatchSize(1)
	.setForceSSL(true);
JS

Server-Side Library as Track domain

It is possible to track all requests via the pixel but use the server-side library to collect and send data to the Mapp Intelligence tracking server. This option allows the pixel to make full use of browser-side tracking and cookies, but instead of exploiting the track domain address to the browser the requests are sent from the server to Mapp Intelligence.

Recommendation

Use the MappIntelligenceHybrid with Cronjob logic for this use case