If possible, book via the airline website, even if it is a bit more expensive, as changing flights or other unexpected problems will be fewer and easier to fix.
You almost always get the same miles/benefits, but once in a while, it might be a bulk fare where you don't get full miles or privileges. You have to check the fare rules to be sure.