Updated tracking algorithm for new schema.