Notes: Tracking Integration
Transfer test possibilities
If the parameter was passed on correctly, the interface will return The event was successfully tracked
and the HTML status code 200
. If there is a problem with the tracking request, an error message (for example: The parameter [id] is required and cannot be empty
) and the HTML status code 400 is returned. This way you can check the integration and if all needed parameters were passed on.
Another option to check the correctness your tracking integration is to use the Analytics Diagnostic view in the FACT-Finder management interface.
Sending of multiple events in one request
With FACT-Finder it is possible to transmit multiple events in one URL/method request. Especially during a buy event this can significantly reduce the number of URL requests and therefore network traffic, because instead of one request per bought article only one request has to be sent overall.
Should you have integrated tracking by Web service then please use the method logMultipleInformation
to which multiple TrackingEvent
objects can be sent.
If you are transmitting the tracking via URL parameters, please not that for a request only events of the same type can be logged. This means that you can for example only send multiple buy events or multiple cart events in one request, not a mix of both. To pass on multiple events you have to send the parameter of the corresponding type multiple times as can be seen in the example below.
Example
$stringEscapeUtils.escapeHtml($body)
“Add to shopping cart” feature on the result page
If you give users a direct option to add products to the shopping basket from the search results page, you need to ensure that you pass both click
data and cart
data when this event occurs. This is the only way to determine that the item has been placed into the shopping basket directly from a search term.
Usage of Semantic Enhancer Live-Learning
The Semantic Enhancer module improves the rank of products that are semantically related to products previously clicked or bought by other users for a given query
.
In case you are using personalization-based semantic enhancement and you want to immediately see the effect of buy and cart events, the so called “Live-Learning” for semantic enhancement, you not only have to provide the query
parameter for click events but also for cart
and checkout
events. Without the query parameter for these events live-learning will not be possible.
Example
$stringEscapeUtils.escapeHtml($body)
Tracking when using personalization
The Personalization module can be used to rearrange search results based on previously observed user behaviour. For FACT-Finder to learn relevant user behaviour, tracking events and searches have to be matched up. At login time the session ID is associated with a user ID via the login event. Then all further tracking- and search requests of a user carry that same session ID.
Disguised data
Some of the data that is passed, while not contravening data protection legislation, could give users cause for concern if it is seen. For this reason, FACT-Finder allows you to disguise information before it is passed. This is done by encoding the URL portion that is to be sent using the Base64 algorithm and sending this as the value of a specific parameter. The names of parameters that contain encoded data can be configured1. The default configuration treats the parameter “p” as encoded parameter.
Example
You wish to send the following data to the FACT-Finder Tracking module in coded format:
page=5&query=cigars&age=27&gender=f
The Base64 encoded value for this text would be:
cGFnZT01JnF1ZXJ5PWNpZ2FycyZhZ2U9MjcmZ2VuZGVyPWY=
When combined with the parameter name and the other, unencoded parameters, the request would appear as follows (the equals sign in the Base64 encoded URL portion has been URL-encoded before creating the http request):
./Tracking.ff?p=cGFnZT01JnF1ZXJ5PWNpZ2FycyZhZ2U9MjcmZ2VuZGVyPWY%3D&event=click
The outgoing text should be URL encoded before conversion to Base64 encoding. This process should use the same encoding that has been configured for FACT-Finder (normally UTF-8). The example above contains no special characters, so it is not clear that the URL has already been encoded. If the search query “skirts & dresses” is to be encoded, for example, the output text presented for Base64 encoding should be:
page=5&query=hosen%20%26%20r%C3%B6cke&age=27
Other
You can also call the tracking events in the source code when accessing the details page. This brings the advantage of not being dependent on the activity of JavaScript on the side of the shop visitor. However, you will need to ensure that the required parameters are also sent in order for this to work.