If you are changing web protocol (for example HTTP to HTTPS) or adding/removing the ‘www’ part of your domain, then the changes will remain in place.
However, if you are changing the domain name of your website or you are moving to a different CMS platform, the changes that you have made using the Onsite Optimizer will not carry over, and you will have to reinstall the Onsite Optimizer on the new website.