---
schema_version: "1"
id: 5cd573e78b34cab91f812b4b228870d6e1c8d065b53cbce09a76fa99242f3fde
title: Specify Source Code Site Preferences
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_specifying_source_code_site_preferences.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_specifying_source_code_site_preferences.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6a6e6e7f5efde7fc6d227ca21d03eb1f176c2727e8b46170dbfac5d82728aa56
description: Merchants use source codes to track customer activity and the source of incoming visits to a storefront. Salesforce B2C Commerce source-code groups enable you to use this information to manage such things as customer redirects, price books, and campaigns. Specify how you want B2C Commerce to handle source codes via site preferences.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Specify Source Code Site Preferences

Merchants use source codes to track customer activity and the source of incoming visits to a storefront. Salesforce B2C Commerce source-code groups enable you to use this information to manage such things as customer redirects, price books, and campaigns. Specify how you want B2C Commerce to handle source codes via site preferences.

1. In Business Manager, click App Launcher ![App Launcher](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/cc/b2c_merchandiser_administrator/images/appLauncher.png), and then select **Merchant Tools** | **site** | **Site Preferences** | **Source Codes.**
2. On the Source Code Preferences page, define defaults for handling source code preferences. For example, specify cookie duration, a standard redirect URL, and defaults for active and inactive redirects. Specify the following settings: <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
          <tbody><tr class="">
            <td style="vertical-align:top;" headers="d63455e61-option" id="d63455e65">URL Parameter Name</td>

            <td style="vertical-align:top;" headers="d63455e61-desc d63455e65">The name of the source-code parameter on the URL query string.</td>

          </tr>
          <tr class="">
            <td style="vertical-align:top;" headers="d63455e61-option" id="d63455e74">Cookie Duration in Days</td>

            <td style="vertical-align:top;" headers="d63455e61-desc d63455e74">The number of days the source code is kept in a user's session (must be a
              number between zero and 999.) This parameter is overridden if a cookie duration
              is specified for a specific source code group</td>

          </tr>
          <tr class="">
            <td style="vertical-align:top;" headers="d63455e61-option" id="d63455e83">Standard Redirect URL</td>

            <td style="vertical-align:top;" headers="d63455e61-desc d63455e83">Used for redirect handling, this parameter appears on the Codes tab of the
              source-code group, with the specified source-code specification appended.
              <div class="slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium">
                <div class="slds-media slds-media_responsive">
                  <div class="slds-media__figure"><span class="slds-icon_container slds-icon_container_circle slds-icon-note-note"><img style="margin-bottom:0;" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png" alt="Note"></span></div>
                  <div class="slds-media__body" style="padding-top:.5rem;padding-bottom:.5rem;"><span class="slds-text-title_caps">Note</span> You also specify this URL in the SEO section, where you map this URL
                    to the actual redirect URL.</div>
                </div>
              </div>
              See the following example.
            </td>

          </tr>
          <tr class="">
            <td style="vertical-align:top;" headers="d63455e61-option" id="d63455e95">Active and Inactive Redirect Defaults</td>

            <td style="vertical-align:top;" headers="d63455e61-desc d63455e95">
              <p>Valid values are:</p>
              <ul>
                <li>
                  <p>Home Page: URL for the home page</p>
                </li>

                <li>
                  <p>Category: Category ID</p>
                </li>

                <li>
                  <p>URL: Specific URL</p>
                </li>

              </ul>

            </td>

          </tr>
        </tbody></table>
    
    Standard Redirect URL example
    
    Supply 'www.garden.com' in this field, and select **Default** for the redirect of the GARDEN source-code group. If you supply this value, this URL appears on the Codes page for the GARDEN source-code group. The URL appears in the Redirect URL field for all source-code specifications within that source-code group, with their individual source-code specification appended:
    
     
    | Source-Code Specification | Redirect URL |
    | --- | --- |
    | GARDENSPR | http://www.garden.com?src=GARDENSPR\* |
    | GARDEN | http://www.garden.com?src=GARDEN |

To redirect customers using the _default_ URL:

1. Enable storefront URLs (legacy SEO URLs), by selecting **Merchant Tools** | **site** | **Site Preferences** | **Storefront URLs.**
2. To define URL rules, select **Merchant Tools** | **site** | **SEO** | **URL Rules** (Search Support Preferences page.)
3. To specify URL redirects, select **Merchant Tools** | **site** | **SEO** | **URL Redirects.**