Notes: Tracking Integration

Transfer test possibilities

If the JSON object was passed on correctly, the interface will return 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.

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.

Example

$stringEscapeUtils.escapeHtml($body)

A JSON object array reflecting this case would look like this:

[
  {
    "count": 1,
    "id": "456",
    "price": 9.99,
    "sid": "session1"
  },
  {
    "count": 1,
    "id": "789",
    "price": 39.99,
    "sid": "session1"
  }
]

There are similar calls for other events (see Swagger-UI).

“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.


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.