Add a query string to ALL links on site

Our client would like to embed his site into an iframe in their software backend. I get a query string on the first link but need to make sure that string persists across URLs for all links and navigation on the iframed site. How do I do that?

This only needs to happen when the query string is present.

EDIT: Come this far, just don’t know what to do to persist the clean=true query where it appears.

function add_rewrite_rules($aRules) {
    $aNewRules = array('^/([^/]+)/?$' => 'index.php?clean=$matches[1]');
    $aRules = $aNewRules + $aRules;
    return $aRules;
}

add_filter('rewrite_rules_array', 'add_rewrite_rules');
function add_query_vars($qvars) {
    $qvars[] = "clean";    
    return $qvars;
}
add_filter('query_vars', 'add_query_vars');

Solutions Collecting From Web of "Add a query string to ALL links on site"