Using 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 refer customers to many different product pages.

How dynamic referral links work

Dynamic referral links are custom links created by the company you partner with, that point to specific destination templates.

Companies that are set up to track customer creation on every page of their site, may provide you with a dynamic referral link, which you can then use to create an unlimited number of referral links outside of PartnerStack pointing to different product pages.

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 creating a dynamic referral link with a company you partner with.

In the first stage, you will determine the dynamic referral link destination template, and provide this to the company you partner with. Once the company has created a custom link for you, you will edit the link externally before sharing. This guide will walk you through how to create a dynamic referral link for a specific product page and search results.

Dynamic link creation overview

  1. Create a dynamic referral link template, and reach out to the company you partner with to request the creation of a dynamic referral link template.
    1. Information to provide: your desired link template, and link customization.
    2. Note: If the company is not set up to track customer creation across their entire site, they may choose not to create a dynamic link for you, to prevent missed referrals.
  2. Once the company has created your dynamic referral link, 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?

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

Note: 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 dynamic referral 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. Reach out to the company you partner with to request the creation of a dynamic referral link

  1. Login to your account
  2. Click "Switch Program" in the top right-hand side of your account
  3. In your Messages tab, request that the company create a custom referral link for you, pointing to the destination template you created in step 2, and provide them with your desired link customization (the text that will display in your final referral link (i.e. your business name or social handle)

Once the company you partner with has created your custom link, you will see your templated URL as the destination:

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. Reach out to the company you partner with to request the creation of a dynamic referral link, pointing to a search result

  1. Login to your account
  2. Click "Switch Program" in the top right-hand side of your account
  3. In your Messages tab, request that the company create a custom referral link for you, pointing to the destination URL you created in step 2, and provide them with your desired link customization (the text that will display in your final referral link (i.e. your business name or social handle)

Once the company you partner with has created your custom link, you will see your templated URL as the destination. 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