Added optional compile flag for JSON tracking