Load the page only after checking the Referring URL

Hello,

This is what I am trying to achieve.

A - User visits a landing page which introduces Premium content. (created in Webflow. Read-only Link below)
B - User clicks on the Buy button and goes to a payment gateway,
C - Upon successful payment, the gateway redirects the user to another page in Webflow that has the premium content.

What I need your help with.
I want to C to load only if the referrer is B. Else send the user back to A.
In other words, if someone lands on Page C directly, I don’t want to them to see the premium content.

I researched a bit and found this useful link in Stack Overflow. I understand this is not foolproof but this works for me.

Now how do I achieve this within Webflow.
Appreciate all help.

Here is the link to landing page.

https://preview.webflow.com/preview/dasubhashitam?utm_medium=preview_link&utm_source=designer&utm_content=dasubhashitam&preview=d3bd932cf04375a4310f4e88d5d8d118&pageId=5d1d992cffdd16da7c31927a&mode=preview

1 Like

Hi @kkirank, good to see you on the forum again! :slight_smile:

My recommendation would be to use MemberStack, they have all the permissions etc set up so you don’t have to mess with any code:

I’m sure if you have any difficulties you could reach out to @DuncanHamra directly, he’s always super helpful :slight_smile:

Hope that helps! :wave:t2:

2 Likes

Thanks, @asksj!

Hi @kkirank. You’ve described gated content in MemberStack almost exactly :sweat_smile:

We even have a feature that replaced links to C with links to B unless the user has an account. Better still, MemberStack remembers what page the user was trying to view, and redirects them back after a successful purchase. Meaning, you can have dozens or hundreds of gated pages and MemberStack will manage all of the redirects for you :grin:

Btw - it’s possible to translate the MemberStack UI as well. Just contact me when you’re ready, or join our Slack group for more info: Getting Started | Memberstack Community

1 Like

Excellent, I just joined the Slack :grin: don’t know how I missed that!

@asksj Thanks a ton for the quick response.
@DuncanHamra thanks for reaching out. I will surely explore MemberStack.

1 Like