All posts
TraccarAIDriver BehaviourFleet

Driver behaviour scoring with Traccar data

Nov 21, 20264 min read

Fleet owners rarely want another map. They want answers: who drives safely, who doesn't, and is it getting better? A driver score gives that answer in one number.

Traccar already collects most of the data you need. This post shows where it comes from and how to turn it into a fair score.

Where the data comes from

Behaviour Source in Traccar
Harsh braking Alarm hardBraking, sent by trackers with an accelerometer
Harsh acceleration Alarm hardAcceleration
Sharp cornering Alarm hardCornering
Speeding Overspeed events, when you set a speed limit on the device or a geofence
Idling Stops with ignition on, from trip and stop reports
Distance Summary report

Two things to check first:

  1. Your trackers must detect harsh driving. Many Teltonika, Queclink, Concox and other models can, but it's often off by default. Turn on the eco-driving or harsh-driving feature in the device configuration, and set sensible thresholds.
  2. Set a speed limit. In Traccar, add the speedLimit attribute to each device (or group, or geofence), so overspeed events are created.

A simple, fair formula

Raw counts aren't fair: a driver who covers 2,000 km will have more events than one who drives 100 km. So count events per 100 km, then take penalties off 100:

score = 100
      - 3 × harsh braking per 100 km
      - 2 × harsh acceleration per 100 km
      - 2 × sharp cornering per 100 km
      - 5 × overspeed events per 100 km
      - 1 × idling minutes per 100 km ÷ 10

Keep the score between 0 and 100.

The weights are a starting point. Overspeed gets the biggest penalty because it's the biggest risk. Adjust them with your customers: a bus company and a delivery fleet care about different things.

Getting the numbers from Traccar

You can export reports from the Traccar web interface, but for a score you'll want to automate it. Traccar's REST API gives you everything:

  • Events report for a device and date range, filtered by type, for alarms and overspeed: GET /api/reports/events?deviceId=1&from=...&to=...&type=alarm
  • Summary report for distance and engine hours: GET /api/reports/summary?deviceId=1&from=...&to=...
  • Stops report for stop durations, which you can combine with ignition state for idling

A small script (in PHP, Python or Node) can run every night, calculate the score for each driver or vehicle, and save it.

Scoring drivers, not just vehicles

Traccar tracks devices, and a device sits in a vehicle. If drivers change vehicles, you need to know who drove when. Options:

  • Driver ID with RFID or iButton readers on supported trackers. Traccar stores the driver's ID on each position and has a Drivers section to name them.
  • A shift schedule that says which driver had which vehicle each day.

Without either, score vehicles instead. It's still useful.

Show it where people look

A score nobody sees changes nothing. Good places to show it:

  • A weekly ranking emailed to the fleet manager every Monday
  • A driver's own score in the mobile app, so drivers can improve
  • An alert when a driver's score drops sharply in one week

Rankings work best when they reward improvement, not just punish the bottom of the list.

Where AI helps

The formula above is rule-based, and that's fine to start. With more history, AI models can:

  • Learn what's normal for each route and vehicle type, so a hilly route isn't punished like a reckless driver
  • Spot patterns before accidents, such as fatigue at the end of long shifts
  • Explain scores in plain language: "more harsh braking on the Chennai–Bengaluru highway at night"

Summary

  1. Turn on harsh driving detection in your trackers and set speed limits.
  2. Count events per 100 km so the score is fair.
  3. Automate it with the Traccar reports API and show it every week.
  4. Add AI once you have a few months of data.

Want driver scoring in your own platform and apps? See AI features for fleet tracking and custom Traccar development.

Keep reading

Need help with your Traccar server?

I offer Traccar setup and maintenance, GPS tracking apps and Flutter development.