You've probably tested this, but are you sure #opt-in-message will survive any redirection?

Assuming path is: - R2 link with hash -> bounced through preference setting URL -> NGW