Creating dynamic referral links

  • Updated

Who is this article for?

This article will be useful to you if are a partner on PartnerStack looking to use dynamic links to create more than 100 custom links.

PartnerStack allows you to make up to 100 custom referral links. If you need more than 100 custom referral links, we you can create a custom referral link that points to a destination template.

How dynamic referral links work

Using dynamic referral links allows you to create just a few custom referral links within PartnerStack, but an unlimited amount outside of PartnerStack, using your custom links as templates.

You will need to keep track of the links you are creating outside of PartnerStack in an external text editor, such as a spreadsheet.

There are two main stages to create a dynamic referral link. First you'll create a custom referral link in PartnerStack, then you will edit the link externally before sharing. This guide will walk you through how to create a dynamic referral link for a specific page, and for a search.

  1. In your  PartnerStack dashboard: Create a custom referral link within PartnerStack with templates formatted to match the subdirectories of the URL of the page you want to send traffic to
  2. In an external text editor: Add the URL subdirectories as values for your created templates and share your full dynamic link

What are subdirectories, templates and values?

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" 

Create a dynamic referral link for a specific product

Steps 1-3 of creating a dynamic referral link for a specific product are done in your PartnerStack dashboard. Steps 4 and 5 are done externally to PartnerStack in a text editor, such as a spreadsheet. Let's get started!

1. Determine how many subdirectories are in the URL of the page you want 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. Create your custom link destination by replacing the URL subdirectories with templates

The number of templates in your custom link destination URL should equal the number of subdirectories in your desired product page URL.

Templates are contained in braces/curly brackets i.e. {template_name}. If your 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

  1. Login to your account
  2. Click "Switch Program" in the top right-hand side of your account
  3. Select the program you are wanting to create a dynamic referral link for
  4. In the menu on the left-hand side, select "Links"
    1. If the program has enabled custom link creation you will see a "Custom link block". If the program has not enabled custom link creation, contact the company directly for more information
  5. Click "Create a custom link"
  6. In the drawer view that opens enter:
    1. Your link title and description
    2. Your link customization - this is the text that will display for your final link URL (i.e. your business name or social handle)
    3. For the link's destination enter the destination URL with templates you created in step 2
      1. i.e. custom link destination = https://website.com/{type}/{product}/{group}
  7. Click "Create link"

Once you have created your custom link, you will see your templated URL as the destionation:

Screenshot 2024-03-08 at 4.54.50 PM.png

If you copy and share this link right away, it will not redirect to your desired page. In steps 4 and 5, we'll create the final link(s) externally to PartnerStack that you will share.

4. Create an external document to store your dynamic links

In an external text editor, such as a spreadsheet, record the original URL you would like to promote, and the custom link you created in step 3.

  1. In your Links tab, copy your custom referral link
  2. Paste your custom referral link into an external text editor (i.e. Google Sheets)
  3. Next to this, paste the link to the product you want to promote so you can easily view both links
Custom referral link Product URL

https://website.grsm.io/supportexample

https://website.com/category/item/colour

5. Finalize your link by adding values to your link templates

The last step is to provide the values to the templates in the destination URL. Your link will not redirect to your desired product page if you skip this step.

Building blocks:

  • Custom referral link: https://website.grsm.io/supportexample  
  • Custom link destination (3 templates): https://website.com/{type}/{product}/{group}
  • Product URL (3 subdirectories): https://website.com/category/item/color
  • Values in subdirectories to add to your templates: category, item, and color

To add your URL values to your custom link, use the following formatting:

  • Add a question mark (?) to the end of your custom referral link
    • https://website.grsm.io/supportexample?
  • Add your template names, and the associated values using the formatting {template}={value}
    • https://website.grsm.io/supportexample?type=category
      • "type" is the first template in our custom URL destination and "category" is the first subdirectory value of the product URL
  • Add an ampersand (&) to separate multiple template/value pairs
    • https://website.grsm.io/supportexample?type=category&product=item&group=color

In your external text editor we recommend keeping track of your custom link, destination templates, the product URL and all the final links you create. This will keep all your dynamic links orgnaized, and ready to copy and share.

Custom referral link Destination templates Product URL Final link to share 

https://website.grsm.io/
supportexample

/{type}/{product}/{group} https://website.com/
category/item/color
https://website.grsm.io/supportexample?type=category&product=item&group=color

Sharing the final link created in Step 5 will track your referral for that specific product, without needing to create multiple custom links for each unique product.

Creating multiple links, from one custom referral link template

You can now create links for multiple products using the same custom referral links, so long as the URL you are linking to has the same number of subdirectories as your custom link has templates.

Using the same custom referral link above, we can link to the following pages by repeating step 5:

  • Custom referral link: https://website.grsm.io/supportexample  
  • Custom link destination (3 templates): https://website.com/{type}/{product}/{group}
    • Product URL #1 (3 subdirectories): https://website.com/category/item/monthly
      • Values in subdirectories to add to your templates: category, item, and monthly
      • Final link: https://website.grsm.io/supportexample?type=category&product=item&group=monthly
    • Product URL #2 (3 subdirectories): https://website.com/category/item/yearly
      • Values in subdirectories to add to your templates: category, item, and yearly
      • Final link: https://website.grsm.io/supportexample?type=category&product=item&group=yearly

All three values can change in your final link depending on the product URL you would like to use. Ensure each value is tied to a template from your custom link destination and the number of templates in your custom link destination matches the number of subdirectories in the product URL.

    • Product URL #3 (3 subdirectories): https://website.com/software/plan/enterprise
    • Values in subdirectories to add to your templates: software, plan, enterprise
    • Final link: https://website.grsm.io/supportexample?type=software&product=plan&group=enterprise

Create a dynamic referral link that links to a search result

Steps 1-3 of creating a dynamic referral link for a search result page (rather than a specific product page) are done in your PartnerStack dashboard. Steps 4 and 5 are done externally to PartnerStack in a text editor, such as a spreadsheet.

1. Find the destination URL of the search page you want to promote 

Find the URL of the search page results on the website of the company you are partnering with.

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. Determine your desired 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

  1. Log in to your account
  2. Click "Switch Program" in the top right-hand side of your account
  3. Select the program you are wanting to create a dynamic referral link for
  4. In the menu on the left-hand side, select "Links"
    1. If the program has enabled custom link creation you will see a "Custom link block". If the program has not enabled custom link creation, contact the company directly for more information
  5. Click "Create a custom link"
  6. In the drawer view that opens enter:
    1. Your link title and description
    2. Your link customization - this is the text that will display for your final link URL (i.e. your business name or social handle)
    3. For the link's destination enter the destination URL you created in step 2
      1. i.e. custom link destination = https://website.com/marketplace?query={search_term}
  7. Create this link to save it within your PartnerStack account

If you copy and share this link right away, it will not redirect to your desired page. In steps 4 and 5, we'll create the final link(s) externally to PartnerStack that you will share.

4. Create an external document to store your search term dynamic link 

In an external text editor, such as a spreadsheet, record the original URL you would like to promote, and the custom link you created in step 3.

  1. In your Links tab, copy the custom referral link 
  2. Paste the referral link into an external text editor (i.e Google sheets)
  3. Next to this, paste the link to the search term page URL you want to promote 
Referral link Page

https://website.grsm.io/supportexample

https://website.com/marketplace?query=monthly%20p%20plans

5. Finalize your link by adding values

Note: Your link will not work if you do not provide the values to replace the template in the destination URL.

When linking to a search term page, everything that comes after https://website.com/marketplace?query= is our search value.

Providing a template value looks like {search_term}=searchvalue added to the end of your referral URL. Let's try two examples:

Building blocks:

  • Custom referral link: https://website.grsm.io/supportexample
  • Custom link destination: https://website.com/marketplace?query={search_term}
  • Page to promote: https://website.com/marketplace?query=monthly%20p%20plans
  • Value to sub for template:monthly%20p%20plans

Final link to share: https://website.grsm.io/supportexample?search_term=monthly%20p%20plans

  • Custom referral link: https://website.grsm.io/supportexample
  • Custom link destination: https://website.com/marketplace?query={search_term}
  • Page to promote: https://website.com/marketplace?query=example%20search
  • Value to sub for template: example%20search

Final link to share: https://website.grsm.io/supportexample?search_term=example%20search

Was this article helpful?

2 out of 3 found this helpful