If you use query string parameters when sharing links to your Hub, here's how to make sure they're captured and passed to the right fields in your Marketing Automation Platform when a lead submits a Form CTA.
Before You Begin
- To capture and pass query string parameters on Form CTAs, you need to be an Account Admin or Content Manager.
- You will also need an account with the Marketing Automation Platform you want to use.
About Query String Parameters and Form CTAs
If you use query string parameters in links to your Hub content, you can set up your Form CTAs to capture these parameters and send them to your Marketing Automation Platform (MAP), like Marketo, HubSpot, etc. This is very helpful for tracking users who came to your Hub from a specific campaign, social media platform, etc.
Here's how it works: once you've chosen the general query string parameters based on the kind of information you want to track, you have to...
- Identify the field names in your MAP so that you can name your query string parameters correctly, and...
- Add hidden fields to your Form CTAs that are set up to capture the query string parameters you chose.
With that in place, you can build query strings and share the resulting URLs. Any visitor who enters your Hub using one of these URLs and submits a Form CTA will have their query string automatically sent to your MAP.
Step 1: Identify Field Names
Once you have decided what sort of information you want to track with query string parameters (e.g. campaign, referrer, geography, etc.), you will need to figure out where this information lives in your MAP. This will allow you to name the parameter in the query string correctly, so that the parameter's value is eventually filled into the appropriate field in the MAP.
For example, let's say that we want to send a link to a Hub to prospects in particular countries, and we want to be able to record how many prospects from each country submitted a Form CTA. To do that, we need a query string that identifies the country. The query string will be in the format ?parametername=countryname.
In order to choose the right parameter name, we need to find the field in our MAP that records country names. This might be something like location or country or something else entirely. More specifically, we will need the unique name that references the field we want. In HubSpot, for example, this kind of name is called an "internal name". In this particular case, the internal name we need is country:
Now that we know the correct parameter name, we can use it to form our query string, like this: ?country=canada. Then we just add this query string to the end of the link, and it's ready to be shared:
See below for where to find unique field names in the MAP you use (and what they're called). Also, keep in mind that these unique field names are typically case sensitive, so make sure to use them exactly as they appear.
In HubSpot, you're looking for the internal name of a property. To find the internal name for a property, follow these instructions:
- Log in to HubSpot.
- In the top right corner, click on the Gear icon:
- This will open the Settings menu. In the sidebar on the left, click on Properties.
- In the list of properties, find the property you want to write the query string parameter value to and click on its name to see more details.
- Here, look for Internal name:
- Use the internal name as the parameter name in your query string, exactly as it appears, e.g. ?country=
In Marketo, you're looking for the REST API Name of a field. To find the REST API Name for a field, follow these instructions:
- Log in to Marketo.
- In the top right corner, click on Admin:
- This will open the Admin menu. In the sidebar on the left, click on Field Management (under Database Management):
- In the menu bar at the top, click on Export Field Names:
- This will download an XLS file. Once the download has finished, open the file.
- The file should consist of a table with three columns. In the right-most column, Friendly Label, look for the field you want to write the query string parameter value to.
- When you find the field, look at the corresponding entry under the REST API NAME column:
- Use the REST API Name as the parameter name in your query string, exactly as it appears, e.g. ?address=
In Oracle Eloqua, you're looking for the Database name of a field. To find the Database name for a field, follow these instructions:
- Log in to Oracle Eloqua.
- In the top right corner, click on the gear icon:
- This will open the Settings menu. In the Database Setup section, click on Fields & Views:
- In the Fields section, find the field you want to write the query string parameter value to and click on it to see more details.
- Here, look for Database name:
- Use the Database name as the parameter name in your query string, exactly as it appears, e.g. ?C_Country=
In Pardot you're looking for the Field value of a Prospect Field. To find the Field value for a Prospect Field, follow these instructions:
- Log in to Pardot.
- In the sidebar on the left, click on Admin > Configure Fields > Prospect Fields:
- In the list of Custom Fields or Default Fields (depending on the type), find the field you want to write the query string parameter value to.
- When you find the field, look at the corresponding value under the FIELD column:
- Use the value under the FIELD column as the parameter name in your query string, exactly as it appears, e.g. ?territory=.
Step 2: Configure Hidden Fields on Form CTAs
To make your Form CTAs capture query string parameters and pass them to your MAP, you need to add hidden fields to them. A hidden field is just that: a field that is not visible to the users who interact with the CTA, and which invisibly passes certain details each time the CTA is submitted.
In this case, you need to configure hidden fields to look for specific query string parameters and grab their values. For example, you could set up a hidden field to look for the parameter country: if a visitor enters your Hub with a URL with the query string ?country=canada and then submits that Form CTA, the value canada would be passed to the country field in your MAP.
You can find instructions on how to add hidden fields to your Form CTAs in this article (see the section Set Up a Hidden Field with a Query String Value; click here to go there directly). When filling in the Param field, use the parameter name that you used in the query string (e.g. country for ?country=canada), which you got from your MAP in Step 1.
When you've added the necessary hidden fields to your Form CTAs, you're all set! One last note: remember that you have to configure hidden fields for every CTA separately — query string parameters will only be passed to your MAP by a Form CTA that contains the appropriate hidden fields.