Move tracking to the <head> as it tends to be async.