On my personal experience :
ticket booked on airfrance.lu, first flight KLM, then the remaining is with AirFrance, KL code for my Flying blue card
ticket booked on airfrance.lu, first flight Air France, AF code for my flying blue card
i have always booked with my online profile