Blog, Website & Page Publishing

Kselby
Participante

Form Submission Automatically Starts Download

resolver

Hello,

Currently we have a setup where someone fills out a form and then is directed to a thank you page where they press a cta to download the file. I want to create a way so that when the person submits the form and the thank you page loads, the file automatically starts to download without them pressing the cta button on that page. I just want that cta button to exist there as a backup in case the file download does not automatically start. 

 

Does anyone know a way to accomplish this automatic download process? I know I have seen it on other sites that I have used. 

2 Solução aceitas
Mike_Eastwood
Solução
Conselheiro(a) de destaque | Parceiro Ouro
Conselheiro(a) de destaque | Parceiro Ouro

Form Submission Automatically Starts Download

resolver

Hey @Kselby 

 

We achieved a Download Link by using a Simple Call-To-Action (CTA) then embedding the CTA in a web page (WordPress in this case).

 

The good thing about this process is that you will have views/download information and you can tie it into your campaign stats.

Here's how we do it:


PDF

  1. Go to Marketing > Files & Templates > Files.
  2. Upload the PDF 
  3. Click on the file which opens the panel on the right with the file details.
  4. Copy the URL of the PDF

CTA

  1. Set up the CTA got to Marketing > Lead Capture > CTAs
  2. Create a CTA. (For future CTAs I find it easier to clone an existing campaign and edit the information).
  3. Enter the CTA Information 
    1. Give the CTA a sensible name 
    2. Select a Campaign (or create a new campaign)
    3. Select Web Link (the link tho the PDF)
    4. Paste in the URL from Step 4 of the PDF process
  4. Click on the Design Tab and change the button text
  5. The CSS should be fine unless you're creating a new CTA from scratch.

Download Page

  1. To add the CTA to a page you'll need to copy the Embed Code and paste it into WordPress.
  2. In WordPress you will need to be in Code View, not Preview mode (you should see the raw HTML).

TEST, Test, test

Run an end-to-end test to make sure it's all working.

  1. fill in any forms to get to the download page
  2. download the document
  3. check the filename of the downloaded document
  4. check the statistics in HubSpot to make sure the download was tracked.

Have fun

Mike

Exibir solução no post original

MFrankJohnson
Solução
Autoridade no assunto

Form Submission Automatically Starts Download

resolver

Would have to agree with @Mike_Eastwood ...

 

Can't say we'd ever recommend FORCING PDF download. Especially on an increasingly mobile-centric web where doing so could turn off mobile visitors. In either case, here's a couple posts about how to make it happen. One using .js and the other using PHP.

- see How to trigger the direct download of a PDF with JavaScript
- see How to Use PHP to Force a File Download

 

Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.

 

Hope that helps.

 

Be well,
Frank


www.mfrankjohnson.com

Exibir solução no post original

2 Respostas 2
MFrankJohnson
Solução
Autoridade no assunto

Form Submission Automatically Starts Download

resolver

Would have to agree with @Mike_Eastwood ...

 

Can't say we'd ever recommend FORCING PDF download. Especially on an increasingly mobile-centric web where doing so could turn off mobile visitors. In either case, here's a couple posts about how to make it happen. One using .js and the other using PHP.

- see How to trigger the direct download of a PDF with JavaScript
- see How to Use PHP to Force a File Download

 

Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.

 

Hope that helps.

 

Be well,
Frank


www.mfrankjohnson.com
Mike_Eastwood
Solução
Conselheiro(a) de destaque | Parceiro Ouro
Conselheiro(a) de destaque | Parceiro Ouro

Form Submission Automatically Starts Download

resolver

Hey @Kselby 

 

We achieved a Download Link by using a Simple Call-To-Action (CTA) then embedding the CTA in a web page (WordPress in this case).

 

The good thing about this process is that you will have views/download information and you can tie it into your campaign stats.

Here's how we do it:


PDF

  1. Go to Marketing > Files & Templates > Files.
  2. Upload the PDF 
  3. Click on the file which opens the panel on the right with the file details.
  4. Copy the URL of the PDF

CTA

  1. Set up the CTA got to Marketing > Lead Capture > CTAs
  2. Create a CTA. (For future CTAs I find it easier to clone an existing campaign and edit the information).
  3. Enter the CTA Information 
    1. Give the CTA a sensible name 
    2. Select a Campaign (or create a new campaign)
    3. Select Web Link (the link tho the PDF)
    4. Paste in the URL from Step 4 of the PDF process
  4. Click on the Design Tab and change the button text
  5. The CSS should be fine unless you're creating a new CTA from scratch.

Download Page

  1. To add the CTA to a page you'll need to copy the Embed Code and paste it into WordPress.
  2. In WordPress you will need to be in Code View, not Preview mode (you should see the raw HTML).

TEST, Test, test

Run an end-to-end test to make sure it's all working.

  1. fill in any forms to get to the download page
  2. download the document
  3. check the filename of the downloaded document
  4. check the statistics in HubSpot to make sure the download was tracked.

Have fun

Mike