Blog, Website & Page Publishing

ajpalmer
Participant

How to post file for users so they can't steal it?

SOLVE

Hello,

 

I work in commercial real estate and have a map that our team would like hosted on one of our webpages. Usually, our content is gated and I use HubSpot forms to redirect to a new page of the .pdf after collecting user data. When doing that it is easy for someone to copy and paste the URL at the top of the screen or forward an emailed pdf to share our content without capturing data. This is fine with most of our content, but this map is extremely confidential and can't run the risk of being spread like that.

 

Is there a way to set a file's URL to something like a "one time use" where each person gets a unique download? Or maybe the form redirects to the file on a new page that can recognize if a new IP address is attempting to access it and redirects to the information entry form?

 

I'm open to any solution but I've looked everywhere on my dashboard and can't seem to find an answer.

 

Thank you!

0 Upvotes
2 Accepted solutions
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

How to post file for users so they can't steal it?

SOLVE

When the user submits the form to get the content you could add them to a Hubpot list and then use HubL to check if they're in that list and if they're not use javascript to redirect the page OR you could hide the content and show a no access message.

Here's an example using unless to tell the page unless the user IS in this list redirect them. XXXX is your list ID which you can find at the end of the list URL. (https://app.hubspot.com/contacts/portal_id/lists/list_id

{% unless 'XXXX' in request_contact.list_memberships %}
<script>
$(document).ready(function(){
window.location.href = "http://www.example.com";
});
</script>
{% endunless %}

 

This could be added either on the template or the Footer HTML in the Settings of the landing page.

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

View solution in original post

alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

How to post file for users so they can't steal it?

SOLVE

Hey @ajpalmer ,

 

In the page editor if you go to Settings and add the code to the Footer HTML section under Advanced Options it will add the code to just that one page.

 

Is the link you put in as the redirection a live page? It not being a live page is the only reason I could think it'd be going to a 404.

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

View solution in original post

5 Replies 5
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

How to post file for users so they can't steal it?

SOLVE

When the user submits the form to get the content you could add them to a Hubpot list and then use HubL to check if they're in that list and if they're not use javascript to redirect the page OR you could hide the content and show a no access message.

Here's an example using unless to tell the page unless the user IS in this list redirect them. XXXX is your list ID which you can find at the end of the list URL. (https://app.hubspot.com/contacts/portal_id/lists/list_id

{% unless 'XXXX' in request_contact.list_memberships %}
<script>
$(document).ready(function(){
window.location.href = "http://www.example.com";
});
</script>
{% endunless %}

 

This could be added either on the template or the Footer HTML in the Settings of the landing page.

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
ajpalmer
Participant

How to post file for users so they can't steal it?

SOLVE

Thank you so much! That's working perfectly in terms of keeping people out of the page.

 

However, instead of linking to the page I want it to redirect to, it keeps defaulting to a "404 not found" page.

 

The website was originally set up by someone who can code far better than me. I do not know if it is something that was set up in the original template that will affect all of the other landing pages if I edit it. 

 

Is there a way to override that setting just for this page so it redirects to what I want?

 

Thank you so much for your help!

0 Upvotes
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

How to post file for users so they can't steal it?

SOLVE

Hey @ajpalmer ,

 

In the page editor if you go to Settings and add the code to the Footer HTML section under Advanced Options it will add the code to just that one page.

 

Is the link you put in as the redirection a live page? It not being a live page is the only reason I could think it'd be going to a 404.

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
ajpalmer
Participant

How to post file for users so they can't steal it?

SOLVE

It looks like that fixed it--thank you so, so much! 

0 Upvotes
alyssamwilie
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

How to post file for users so they can't steal it?

SOLVE

No problem, glad I coud help!

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
0 Upvotes