Who is this article for?
This article will be useful to you if are a company on PartnerStack looking to create dynamic link templates for your partners.
Note: If you are creating dynamic referral links for your partners please ensure you have set up full site-wide tracking for PartnerStack links, and would like to allow partners to create links to any page on your website.
How dynamic referral links work
If your company has many products across your site, your partners may have asked you to create multiple custom links, or secondary/recommended links.
A dynamic referral link is a custom link that points to a destination template.
Dynamic referral links enable you to create just a few custom referral links for a partner within PartnerStack. Once set up, your partner can generate an unlimited number of referral links outside of PartnerStack, each pointing to different product pages on your site.
Partners will need to keep track of the links they create outside of PartnerStack in an external text editor, such as a spreadsheet.
There are two main stages to creating a dynamic referral link for a partner:
-
Determine with the partner what the template of their dynamic link should be, and confirm their desired link customization.
- The dynamic link template will be based on the number of subdirectories in your website's URLs. If the number of subdirectories in your product links varies, you can create multiple dynamic link templates for your partner.
- The link's customization is the text that will display in the partner's final link URL (i.e. their business name or social handle)
- Create a custom link for your partner, using the link template determined in step 1 as the link destination.
Once you have created the custom link for your partner, they will be able to edit the link externally before sharing. This guide will walk you through how to create a dynamic referral link for a specific page and a product search.
What are subdirectories, templates, and values?
Before jumping into the steps to create a dynamic referral link, let's define what subdirectories, templates, and values are.
Subdirectories: Parts of the product destination URL that are separated by backslashes
- https://website.com/category/item - has 2 subdirectories as there are two parts of the URL following backslashes
- https://website.com/category/item/color - has 3 subdirectories as there are three parts of the URL following backslashes
Templates: Placeholders in your custom link destination that match the number of subdirectories in your product destination URL
- Templates can be named anything, and you can have more than one template in a link. However, if your link contains multiple templates, each template within the link must be unique.
- https://website.com/{template1}/{template2}/{template3}
Values: The actual text in the destination URL subdirectories that you will plug into your final link externally before sharing
- The values will be populated via query parameters i.e. {template}=value
- Query parameters are a defined set of parameters attached to the end of a URL
- They are extensions of the URL that are used to help define specific content or actions based on the data being passed
- https://website.com/category/product/color - the values in this URL that you will append to your final link are "category", "product" and "color"
Creating a dynamic referral link for a specific product
Steps 1 and 2 of this process can be done entirely by the partner, or you can help them determine the number of subdirectories and the template they will need to use. Step 3 must be completed by you in the company dashboard.
1. Help your partner determine how many subdirectories are in the URL of the pages your partner wants to promote
A subdirectory makes up part of a URL, and is typically what will come after the ".com/" and will be separated by backslashes. Anything that follows a backslash is a subdirectory.
If there are multiple backslashes after .com/ then there are multiple subdirectories in the URL and your link templates must accommodate for those.
- https://website.com/category/product has 2 subdirectories (2 parts of the URL following backslashes)
- https://website.com/category/product/color has 3 subdirectories (3 parts of the URL following backslashes)
2. Help your partner create the custom link destination by replacing the URL subdirectories with templates
The number of templates in the custom link destination URL should equal the number of subdirectories in the desired product page URL.
Templates are contained in braces/curly brackets i.e. {template_name}. If the destination URL has multiple subdirectories, you will need to create multiple templates separated by backslashes.
The templates can be named anything, however, if your link contains multiple templates, each template must be unique.
- The URL https://website.com/category/item has 2 subdirectories so create 2 templates in the custom link destination URL:
- https://website.com/{type}/{product} where {type} and {product} are the templates
- The URL https://website.com/category/item/colour has 3 subdirectories so create 3 templates in the custom link destination URL:
- https://website.com/{type}/{product}/{group} where {type}, {product}, and {group} are the templates
3. Make a custom link with the template URL you created in Step 2
- Login to your account
- In your All Partners tab, search for and click on your desired partner
- Scroll down to your partner's "Links" section, click "Create a custom link"
- In the drawer view that opens enter:
- The link title and description
- The link customization requested by the partner (the text that will display for the partner's final link URL)
- For the link's destination enter the destination URL with templates you created in step 2
- i.e. custom link destination = https://website.com/{type}/{product}/{group}
- Click "Create link"
Once you have created the custom link, you will see your templated URL as the destination:
Your partner can now follow the steps in this support guide to add the URL subdirectories as values to your created template and share their full dynamic link.
If your partner copies and shares the dynamic referral link straight from their dashboard, the link will not redirect to your desired page. Please ensure they follow the steps in the Using dynamic referral links support guide before sharing their full link.
Create a dynamic referral link that links to a search result
Steps 1 and 2 of this process can be done entirely by the partner, or you can help them determine the dynamic referral template for a search result page (rather than a specific product page). Step 3 must be completed by you in the company dashboard.
1. Help your partner determine the destination URL of the search page you want to promote
Find the URL of the desired search page results on your company website. For example, if you search "monthly plans" in a website's search bar the URL may look something like this:
- https://website.com/marketplace?query=monthly%20p%20plans
2. Help your partner determine the dynamic referral link destination URL
Taking the URL example from step 1, we can see that we would only need one template i.e. {search_term} in our custom link destination URL. This template will be used to provide the search term results.
Following the example above, the custom link destination URL will be:
- https://website.com/marketplace?query={search_term}
3. Create a custom referral link with the destination URL established in Step 3
- Login to your account
- In your All Partners tab, search for and click on your desired partner
- Scroll down to your partner's "Links" section, click "Create a custom link"
- In the drawer view that opens enter:
- The link title and description
- The link customization requested by the partner (the text that will display for the partner's final link URL)
- For the link's destination enter the destination URL with templates you created in step 2
-
- i.e. custom link destination = https://website.com/marketplace?query={search_term}
-
- Click "Create link"
Your partner can now follow the steps in this support guide to add the URL subdirectories as values to your created template and share their full dynamic link.