{
  "Status": true,
  "Message": "",
  "Response": {
    "post": {
      "postuid": "0ab105d3-c8d0-490f-98e6-ea3feb3a66d8",
      "tenantuid": "d8b744fc-2e70-4089-bb80-dd1d08f6c7b2",
      "projectuid": "239698c5-f7eb-4574-8cc8-c6568f08b3a0",
      "title": "Working with affiliate links",
      "slug": "article/working-with-affiliate-links",
      "html": "\u003Cp\u003EFor customers that are franchises or multi-level marketing companies, it\u0027s common to want to use affiliate marketing in their outbound emails and SMS.\u003C/p\u003E\u003Ch2 id=\u0022what_is_affiliate_marketing\u0022\u003EWhat is affiliate marketing?\u003C/h2\u003E\u003Cp\u003EAffiliate marketing is specifically the process where an affiliate (you and/or your business) earns a commission for marketing another\u2019s products.\u003C/p\u003E\u003Cp\u003EAs it relates to digital marketing, affiliates are typically provided an affiliate link that they can share. When people click on that links and sign-up for the product or service, typically within a specific window of time, the affiliate receives a commission.\u003C/p\u003E\u003Ch3 id=\u0022affiliate_marketing_example\u0022\u003EAffiliate marketing example\u003C/h3\u003E\u003Cp\u003EFor example, DailyStory makes use of a two-sided affiliate marketing program: when a customer shares their referral URL and a new customers signs up, the new customer gets a discount and the referring customer receives a financial credit.\u003C/p\u003E\u003Cp\u003EFor example, here is the affiliate link for DailyStory:\u003C/p\u003E\u003Cp\u003Ehttps://www.dailystory.com/invite?friend=4933ca402181fcf4a5c94713daaa9921\u003C/p\u003E\u003Cp\u003EThe value\u0026nbsp;\u003Cb\u003E4933ca402181fcf4a5c94713daaa9921 \u003C/b\u003Eis the affiliate identifier used to credit a sign up.\u003C/p\u003E\u003Cp\u003EAnother example might be:\u003C/p\u003E\u003Cp\u003Ehttp://insertbusinessname.com/\u003Cb\u003Egarnernc\u003C/b\u003E\u003C/p\u003E\u003Cp\u003EIn this example, the \u003Cb\u003Ebusiness location\u003C/b\u003E is the affiliate identifier and would be utilized in the import rather than the entire URL.\u0026nbsp;\u003C/p\u003E\u003Cp\u003EIn most cases, sharing an affiliate link is simple: just include the affiliate link directly in your CTA for your email or SMS message. But for scenarios that are more complex, such as when you have unique affiliate links for certain users, you can still easily run affiliate marketing in DailyStory.\u003C/p\u003E\u003Ch2 id=\u0022setting_up_dynamic_affiliate_links\u0022\u003ESetting up dynamic affiliate links\u003C/h2\u003E\u003Cp\u003ETo setup dynamic affiliate links the first step is to create a \u003Ca href=\u0022/article/h1vsml1ve0-create-or-edit-custom-contact-field\u0022\u003Ecustom field\u003C/a\u003E. \u003C/p\u003E\u003Col\u003E\u003Cli\u003ECreate a custom field for the affiliate id\u003C/li\u003E\u003C/ol\u003E\u003Cp\u003EA custom field is something that is available to be assigned to a contact. For example, we can create a custom field called \u003Ccode class=\u0022inline-code\u0022\u003Eaffiliate_id\u003C/code\u003E:\u003C/p\u003E\u003Cimg class=\u0022lazy-load\u0022 data-width=\u0022963\u0022 data-height=\u0022111\u0022 data-src=\u0022https://graffiti-auf7e6dwhxhcbwek.z03.azurefd.net/d8b744fc-2e70-4089-bb80-dd1d08f6c7b2/239698c5-f7eb-4574-8cc8-c6568f08b3a0/573e327b-7e9d-4cb8-9507-ea09a27d0cb6.png?v=1566084310\u0022 style=\u0022\u0022 alt=\u0022\u0022/\u003E\u003Cp\u003EIn the above screen shot a new custom field named Affiliate Id was created. It is just a simple Text field and does not need to be configured as Indexed/Searchable. Once created we can also see the API name of the field, clicking it will copy it to your clipboard.\u003C/p\u003E\u003Col start=\u00222\u0022\u003E\u003Cli\u003EPopulate the value for the affiliate id\u003C/li\u003E\u003C/ol\u003E\u003Cp\u003ENext, we need to set the value for the contacts in the system that will be using the affiliate id. For example, contacts might have an affiliate id associated with the store or location or it may be geographically / regionally based.\u003C/p\u003E\u003Cp\u003EUpdating the affiliate id can be done manually for a small group, but using an import is an easier mechanism for a bulk update.\u003C/p\u003E\u003Ch3 id=\u0022use_segments_for_affiliate_identification\u0022\u003EUse segments for affiliate identification\u003C/h3\u003E\u003Cp\u003EIn most cases the people associated with affiliate links can be segmented. For example, a segment by store or state. \u003C/p\u003E\u003Cp\u003EExport the segment, open the exported file, and add a new column affiliate id. Then save this updated file. \u003C/p\u003E\u003Cp\u003ENext, re-import the updated file with the new column and map the affiliate id column to the affiliate id custom field:\u003C/p\u003E\u003Cimg class=\u0022lazy-load\u0022 data-width=\u0022996\u0022 data-height=\u0022515\u0022 data-src=\u0022https://graffiti-auf7e6dwhxhcbwek.z03.azurefd.net/d8b744fc-2e70-4089-bb80-dd1d08f6c7b2/239698c5-f7eb-4574-8cc8-c6568f08b3a0/44d8a43d-74e8-4d8a-942c-da164173e62b.png?v=-1769426058\u0022 style=\u0022\u0022 alt=\u0022\u0022/\u003E\u003Ccite class=\u0022important\u0022\u003E\u003Cspan class=\u0022title\u0022\u003EImportant\u003C/span\u003E\u003Cp\u003EWhen importing an existing segment to update data, the \u003Cb\u003EDailyStory ID column\u003C/b\u003E must be mapped to. The only other column needed is the Affiliate ID.\u003C/p\u003E\u003C/cite\u003E\u003Cp\u003EOnce the import is complete, the contacts in the segment will have their unique affiliate id mapped to them.\u003C/p\u003E\u003Cp\u003ENote, you can use this same technique if you want to create a unique affiliate code per-contact.\u003C/p\u003E\u003Col start=\u00223\u0022\u003E\u003Cli\u003EUse the affiliate id in a URL\u003C/li\u003E\u003C/ol\u003E\u003Cp\u003ENow that the contact\u0027s have their affiliate id assigned to them, we can use the affiliate id in URLs. You\u0027ll want to utilize your own affiliate URL.\u0026nbsp;\u003C/p\u003E\u003Cp\u003EFor example, to set the call to action (CTA) button in an email the affiliate URL can be set using personalization:\u003C/p\u003E\u003Cp\u003Ehttps://www.dailystory.com/invite?friend={{profile.c__affiliate_id}}\u003C/p\u003E\u003Cp\u003EThe same works for SMS URLs as well.\u003C/p\u003E\u003Cp\u003EWhen the messages are sent the DailyStory personalization engine dynamically builds the URL for each recipient using each recipients assigned Affiliate Id. If you need any assistance setting up your affiliate link, please reach out to us directly.\u0026nbsp;\u003C/p\u003E\u003Ch3 id=\u0022examples_of_dynamic_affiliate_urls\u0022\u003EExamples of dynamic affiliate URLs\u003C/h3\u003E\u003Cp\u003EBelow are some examples of dynamic affiliate URLs. This assumes that a profile property,\u0026nbsp;\u003Ccode class=\u0022inline-code\u0022\u003Eprofile.c__affiliate_id\u003C/code\u003E, exists. For the purpose of these examples, we\u0027ll use a value of affiliate_123 as the value returned (but each affiliate id will be unique to each contact).\u003C/p\u003E\u003Ch4 id=\u0022affiliate_ids_in_the_query_string\u0022\u003EAffiliate IDs in the query string\u003C/h4\u003E\u003Cp\u003EThe most common pattern is for the affiliate id to be part of the URL\u0027s query string:\u003C/p\u003E\u003Cp\u003E\u003Ccode class=\u0022inline-code\u0022\u003Ehttps://exmaple.com/store?affiliate=affiliate_123\u003C/code\u003E\u003C/p\u003E\u003Cp\u003EThis is created as:\u003C/p\u003E\u003Cp\u003E\u003Ccode class=\u0022inline-code\u0022\u003Ehttps://exmaple.com/store?affiliate={{profile.c__affiliate_id}}\u003C/code\u003E\u003C/p\u003E\u003Cp\u003EThis is the preferred pattern, because if the recipient does not have an affiliate id, this URL would still be valid:\u003C/p\u003E\u003Cp\u003E\u003Ccode class=\u0022inline-code\u0022\u003Ehttps://exmaple.com/store?affiliate=\u003C/code\u003E\u003C/p\u003E\u003Ch4 id=\u0022affiliate_ids_in_url_segments\u0022\u003EAffiliate IDs in URL segments\u003C/h4\u003E\u003Cp\u003EA less common patterns is for the affiliate id to be part of the URL segment:\u003C/p\u003E\u003Cp\u003E\u003Ccode class=\u0022inline-code\u0022\u003Ehttps://exmaple.com/store/affiliate_123\u003C/code\u003E\u003C/p\u003E\u003Cp\u003EThis is created as:\u003C/p\u003E\u003Cp\u003E\u003Ccode class=\u0022inline-code\u0022\u003Ehttps://exmaple.com/store/{{profile.c__affiliate_id}}\u003C/code\u003E\u003C/p\u003E\u003Cp\u003EGenerally this is considered a bad practice because if the recipient does not have an affiliate id it may cause a 404.\u003C/p\u003E\u003Ch2 id=\u0022best_practices_with_affiliate_ids\u0022\u003EBest practices with affiliate IDs\u003C/h2\u003E\u003Cp\u003EA best practice when using affiliate IDs that are dynamically inserted into URLs is to use a default value. This prevents an accidental blank value from being used.\u003C/p\u003E\u003Cp\u003EFor example:\u003C/p\u003E\u003Cp\u003E\u003Ccode class=\u0022inline-code\u0022\u003Ehttps://exmaple.com/store?affiliate={{@ profile.c__affiliate_id default=\u0022none\u0022}}\u003C/code\u003E\u003C/p\u003E\u003Cp\u003EIf the recipient does not have a value in their profile, the URL becomes:\u003C/p\u003E\u003Cp\u003E\u003Ccode class=\u0022inline-code\u0022\u003Ehttps://exmaple.com/store?affiliate=none\u003C/code\u003E\u003C/p\u003E\u003Ch2 id=\u0022frequently_asked_questions\u0022\u003EFrequently Asked Questions\u003C/h2\u003E\u003Csection class=\u0022faq\u0022\u003E\u003Ch3\u003EWhat happens if the recipient does not have an affiliate id assigned to them?\u003C/h3\u003E\u003Carticle\u003E\u003Cp\u003EIf an affiliate id is not assigned to the contact, the URL won\u0027t include an affiliate id. Most affiliate URLs are designed to work with or without affiliate ids.\u003C/p\u003E\u003C/article\u003E\u003C/section\u003E\u003Csection class=\u0022faq\u0022\u003E\u003Ch3\u003ECan I assign a default affiliate id if the contact doesn\u0027t have one?\u003C/h3\u003E\u003Carticle\u003E\u003Cp\u003EYes, just rewrite the URL to use\u0026nbsp;\u003Ccode class=\u0022inline-code\u0022\u003E{{@ profile.c__affiliate_id default=\u0022west\u0022}}\u003C/code\u003E. If the contact\u0027s affiliate id is missing, the value west is used instead.\u003C/p\u003E\u003C/article\u003E\u003C/section\u003E\r\n\u003Cscript type=\u0022application/ld\u002Bjson\u0022\u003E\r\n{\r\n  \u0022@context\u0022: \u0022https://schema.org\u0022,\r\n  \u0022@type\u0022: \u0022FAQPage\u0022,\r\n  \u0022mainEntity\u0022: [\r\n{\r\n    \u0022@type\u0022: \u0022Question\u0022,\r\n    \u0022name\u0022: \u0022What happens if the recipient does not have an affiliate id assigned to them?\u0022,\r\n    \u0022acceptedAnswer\u0022: {\r\n    \u0022@type\u0022: \u0022Answer\u0022,\r\n    \u0022text\u0022: \u0022If an affiliate id is not assigned to the contact, the URL won\u0027t include an affiliate id. Most affiliate URLs are designed to work with or without affiliate ids.\u0022\r\n    }\r\n},\r\n{\r\n    \u0022@type\u0022: \u0022Question\u0022,\r\n    \u0022name\u0022: \u0022Can I assign a default affiliate id if the contact doesn\u0027t have one?\u0022,\r\n    \u0022acceptedAnswer\u0022: {\r\n    \u0022@type\u0022: \u0022Answer\u0022,\r\n    \u0022text\u0022: \u0022Yes, just rewrite the URL to use\u0026nbsp; {{@ profile.c__affiliate_id default=\\\u0022west\\\u0022}} . If the contact\u0027s affiliate id is missing, the value west is used instead.\u0022\r\n    }\r\n}\r\n    ]\r\n}\r\n\u003C/script\u003E",
      "publish_status": 0,
      "post_type": "Article",
      "featured_image_updating": false,
      "meta_description": "Learn how franchises and MLMs can use dynamic affiliate links in email/SMS campaigns, set up custom contact fields, and automate referral tracking.",
      "display_toc": true,
      "has_workingcopy": false,
      "allow_indexing": true,
      "sort_order": 0,
      "total_views": 323,
      "date_published": "2025-11-21T14:53:22.7",
      "date_updated": "2025-12-17T22:46:26.023",
      "date_created": "2025-11-21T14:21:32.28"
    }
  }
}