Adding ?ref= parameter to each link and ignoring other parameters.