Hooks go on first, and it is best to fix them to the roof structure, to the rafters. Everything that follows — the gutter, the outlet, the downpipe — simply follows the line they set, so a mistake here cannot be corrected later.