Specifying 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.

You can specify how you want B2C Commerce to handle source codes via site preferences.

  1. Select site > Merchant Tools > SitePreferences > Source Codes.
  2. On the Source Code Preferences page, you can define defaults for handling source code preferences. For example, you can specify cookie duration, a standard redirect URL, as well as defaults for active and inactive redirects. Specify the following settings:
    Option Description
    URL Parameter Name The name of the source-code parameter on the URL query string.
    Cookie Duration in Days The number of days the source code is kept in a user's session (must be a number between zero and 999.) This is overridden if a cookie duration is specified for a specific source code group
    Standard Redirect URL Used for redirect handling; shown on the Codes tab of the source-code group, with the specified source-code specification appended.
    Note: This URL must also be specified in the SEO section, where you map this to the actual redirect URL.
    See the following example.
    Active and Inactive Redirect Defaults

    Valid values are:

    • Home Page: URL for the home page

    • Category: Category ID

    • URL: Specific URL

    Standard Redirect URL example

    If you supply 'www.garden.com' in this field, and select Default for the redirect of the GARDEN source-code group, then on the Codes page for the GARDEN source-code group this 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

If you want to redirect customers using the default URL, you must:

  1. Enable storefront URLs (legacy SEO URLs) by selecting site > Merchant Tools > Site Preferences > Storefront URLs.
  2. Define URL rules by selecting site > Merchant Tools > SEO > URL Rules (Search Support Preferences page.)
  3. Specify URL redirects by selecting site > Merchant Tools > SEO > URL Redirects.