Use URL Query String for sales funnel

REVEALiO
Participant

I am trying to set up an affiliate link that goes from my HubSpot site to a sub domain where orders are processed. I need to have users go to the hubspot site with an affiliate id attached to the url and then go to the subdomain after the sales funnel using the same affiliate ID. It should go like this:

  1. User click on an affiliate ad/link (i.e. examplesite.com?afil=affiliateid) that brings them to our HubSpot site..
  2. User goes through our funnel filling out their name, e-mail, etc. on different forms on each page of the funnel.
  3. At the end if the funnel the user clicks on an "Order Now" button which takes them to our WordPress site which has the affiliate software. This link needs to have the same affiliateID that came from the initial link (i.e. wordpress.examplesite.com?afil=affiliateid).

Since I can't set a cookie within Hubspot I have two ideas the may work.

 

IDEA 1. Keep the initial URL query string in the URL throughout the process. This means that when then get to the landing page (using an affiliate link), the first button has the query string in it. On the next page, they fill out a form and the submit button for the form has to contain original URL query in it to bring it to the next page. This continues until they get to the page with the "Order Now" link (there are only 3-4 pages in each funnel). That page will still have the original query string in the URL. We could then possibly pull the query string using {{request.query}} and add it to a link to the Wordpress site (maybe with Javascript or HubL since PHP is not allowed).

IDEA 2. Put the query string value into a hidden field on an initial form and use it later. Have a form on all Landing Pages and add the affiliate ID to a hidden field on said form to add the affiliate ID to the user data.This post gave me the idea: https://integrate.hubspot.com/t/cookie-question/1951. The question here would be if we add the affiliate id to the user from the URL query string via a hidden form field, can we later put that in a link after they have submitted everything in order to send them to the WordPress site and give credit to the affiliate?

Do any of these seem likely to work? 

If so, any suggestions would be apprecaited.

0 Upvotes
1 Reply 1
ndwilliams3
Key Advisor

I've attempted to do something similar.

IDEA 1. Keep the initial URL query string in the URL throughout the process.

I haven't found a way this can be done. I've tried appending HUBL variables to URL's on form redirects without any success.

 

IDEA 2. Put the query string value into a hidden field on an initial form and use it later.

I think this will be your best option. You can use the {{ contact.your_field_name }} to populate the query parameter again in the "Order Now" link.

 

0 Upvotes