Move retargeting code to footer