There are a number of situations where you might want to adapt the content of a website or article based on the reader, and what relationship you may have with them. The article you are reading now is one example of that, and the basis for the solution I will show you. The same logic can also be used to present different modules on your product pages to existing customers, or to skip the form page on gated content for people who already provided the requested information.
I am not talking about individual personalization here, but rather about efficient segmentation that can present the most relevant content based on what you know about your viewer.
NB: This article is directed at readers with at least some experience working with HubL or basic frontend development.
Case: Full articles should be available to subscribers of our newsletter.
For this example, I will show the solution we have used on the articles in this newsletter.
Our newsletter is primarily intended to be available to our subscribers, who receive an email with new content a couple of times each month. When they click into our website they should see the entire article, without being prompted to subscribe again.