On particular products' pages, I want to show/hide reviews of the product depending on the page that the user came from. For the purposes of this question I am 'hiding' content by not loading it in the first place (not hiding it with CSS).
e.g. - if the user came to a product's page from the contact page (domain.com/contact) the backend code would detect the refer page and then not include the reviews section if the refer is the contact page. For any other referer URL, I will show the reviews section.
Is this seen as dodgy by search engines? I can't think of/remember the term for this practice, but I seem to remember reading that this type of conditional showing of content would be seen as hiding something 'unethically'?
Would search engines penalise my site, once they realise that the product pages show different content depending on where they previously came from? I'm thinking yes, because otherwise I could potentially make a particular page rank highly for a particular search phrase but hide that content for most scenarios, therefore 'tricking' the user into thinking my website/page has what they are looking for.