fix analytics conditional