Method for tracking packages on a conveyor section, the conveyor section comprising a conveyor surface for conveying a sequence of packages, the conveyor section comprising a plurality of photoelectric barriers (LS1, LS2, LS3) for detecting the packages and the method comprising the following steps: a) detecting a photoelectric barrier pattern by means of the photoelectric barriers (LS1, LS2, LS3), the photoelectric barrier pattern being caused by the sequence of packages, b) detecting a conveyor speed of at least one subsection of the conveyor section, c) estimating an event sequence which has with the highest probability caused the photoelectric barrier pattern, while taking into account the conveyor speed of the conveyor section, by means of a Viterbi algorithm, the Viterbi algorithm comprising the following further steps: d) compiling a list of possible event sequences, an event sequence consisting of a plurality of events caused in succession on account of the sequence of packages, a respective event corresponding to an event selected from the following list of events: a package is transported unimpeded and/or a package is removed from the conveyor section and/or a package is added to the conveyor section and/or a package becomes stuck at the position of the photoelectric barrier and/or a package becomes stuck between two photoelectric barriers, e) sorting the event sequences with the aid of their occurrence probability, f) extending the most probable event sequence by all possible consecutive events, the probability of the event sequence being determined for each extension, a consecutive event corresponding to an event selected from the following list of events: a package is transported unimpeded and/or a package is removed from the conveyor section and/or a package is added to the conveyor section and/or a package becomes stuck at the position of the photoelectric barrier and/or a package becomes stuck between two photoelectric barriers, g) incorporating the extensions as a new event sequence into the list of event sequences, h) repeating steps f) to g) until the most probable event sequence fully reflects the detected photoelectric barrier pattern. a) detecting a photoelectric barrier pattern by means of the photoelectric barriers (LS1, LS2, LS3), the photoelectric barrier pattern being caused by the sequence of packages, b) detecting a conveyor speed of at least one subsection of the conveyor section, c) estimating an event sequence which has with the highest probability caused the photoelectric barrier pattern, while taking into account the conveyor speed of the conveyor section, by means of a Viterbi algorithm, the Viterbi algorithm comprising the following further steps: d) compiling a list of possible event sequences, an event sequence consisting of a plurality of events caused in succession on account of the sequence of packages, a respective event corresponding to an event selected from the following list of events: a package is transported unimpeded and/or a package is removed from the conveyor section and/or a package is added to the conveyor section and/or a package becomes stuck at the position of the photoelectric barrier and/or a package becomes stuck between two photoelectric barriers, e) sorting the event sequences with the aid of their occurrence probability, f) extending the most probable event sequence by all possible consecutive events, the probability of the event sequence being determined for each extension, a consecutive event corresponding to an event selected from the following list of events: a package is transported unimpeded and/or a package is removed from the conveyor section and/or a package is added to the conveyor section and/or a package becomes stuck at the position of the photoelectric barrier and/or a package becomes stuck between two photoelectric barriers, g) incorporating the extensions as a new event sequence into the list of event sequences, h) repeating steps f) to g) until the most probable event sequence fully reflects the detected photoelectric barrier pattern.