How to implement a paywall (lead-in) content on a page | Community
Skip to main content
Level 2
October 10, 2024

How to implement a paywall (lead-in) content on a page

  • October 10, 2024
  • 3 replies
  • 1071 views

As part of a site we have a login/subscription model that will restict content visibility to the end users.

 

We want to implement this as a paywall (lead-in) functionality. i.e. when i am logged out/web crawler/logged in but not with the right subscription, then you only see a small portion of the content on the page so that the site can still be crawled by 

 

We want to do this in a way that the page in AEM has all of the content that can be visible, and we want to make using of dispatcher caching of the content.

We don't want to use a javascript function to hide the content as you can inspect the spite, or view page source to get the entire content which will violate the subscription model.

 

Is there any way within the dispatcher of caching different versions based on the users access, or a way to have a cached response based on the cug groups.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

narendiran_ravi
Level 6
October 10, 2024

You can achieve this using Sling Dynamic Include. Refer to this link for more details. Write the logic on the server side to validate if the user has the correct subscription.

Level 2
October 16, 2024

Sling dynamic includes are not supported in AEMaaCS

daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 16, 2024

@taggatmerklewe are using them for years on AEMaaCS

arunpatidar
Community Advisor
Community Advisor
October 15, 2024

Hi @taggatmerkle 

 

You can handle this with dispatcher, based on login cookie rewrite page request with additional selector to show full content otherwise default content or vice-versa.

 

However you need to take care of any additional cache e.g. CDN or browser cache, in this case no-store, so that consumer always get page from dispatcher cache.

 

Arun Patidar
Level 2
October 16, 2024

No, the solution doesn't meet our needs. In the end I am going for a microservice sitting in front of AEM which will handle the reduction of content to only what is public, removing anything that should only be available based on their subscription. 

We will mark the content using the style systems so the microservice knows what to remove

kautuk_sahni
Community Manager
Community Manager
October 16, 2024

@taggatmerkle Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni