Server-side tracking is crucial for companies that must measure mission-critical information on their website, such as order information or other website goals. The Java library of Mapp Intelligence helps you to set up server-side tracking when using Mapp Intelligence as your analysis tool.

Basic Information

The com.mapp.intelligence.tracking is a Java client for Mapp Intelligence.The basis for the data collection on your server is implementing the respective library. The Mapp Intelligence tracking library provides scripts to track user behavior and technical information, such as user agents, among others. 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

Four main use cases can be identified for the Mapp Intelligence Java server library.

Pure Server-Side Tracking

This solution requires to use the Java 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 track 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 setUserId() 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

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

Hybrid Tracking: Server Lib and Pixel

When using both the pixel and the server library, customers can benefit from the best of the two worlds. With this setup you could, for example, track all actions, forms or media via the pixel, but page-related information is tracked using the Java library.

Key Features of Hybrid Tracking

  • Both the pixel and the Java 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.
Customers need to ensure to send the pixel requests to their own server and use the file consumer to send the requests alongside the server-side created requests to the track server.

Configuration recommendation

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

Server-Side Tracking for Mission-Critical Information

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

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 track server to ensure correct processing of the tracking data in Intelligence.

Configuration recommendation

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

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 the data to the Mapp Intelligence track 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