Documentation Center

Configuring the Query service

Tell the Query service information about your Fredhopper setup.

Procedure

  1. In the config\ subfolder of your Query service folder, open smarttarget_conf.xml for editing.
  2. Find the <FredHopper> section.
  3. If your Fredhopper setup does not use catalog01 as its default Universe, set the value of the <DefaultUniverse> element to the default universe used by Fredhopper. A Universe is a collection of items that are held together in a categorization. The top level category in the categorization is the Universe. Typically, Fredhopper has catalog01 as its default (and only) Universe.
  4. If your Fredhopper setup does not use US English as its default locale, set the value of the <DefaultLocale> element to the default locale used by Fredhopper. The locale is a language-region combination, typically written as a language code in lower case, underscore, and a country code in upper case, such as en_GB or fr_BE. By default, standard language (ISO-639) and country (ISO-3166) codes are supported.
  5. Find the <QueryServer> section and set the value of the Url subelement to one of the following:
    • If Fredhopper runs in an on-premise environment, set Url to http://HOST:9180, where HOST is the host name of the machine on which the Fredhopper Query Server runs.
    • If Fredhopper runs in the Cloud, set Url to the URL provided for you by Fredhopper (for example, for an EU-hosted server, the URL would be http://query.published.live1.fas.eu1.fredhopperservices.com/).
  6. If Fredhopper runs in the Cloud, also add the following within the <QueryServer> section, below the Url element:
    <Authentication>
      <Username>USER</Username>
      <Password>PASSWORD</Password>
    </Authentication>

    where USER and PASSWORD are valid username and password, respectively, that grant you access to the Fredhopper Query Server.

  7. In the <Timeouts> subsection of <QueryServer>, set the value of <Query> to the maximum amount of milliseconds to take executing a Fredhopper query before displaying fallback content in the Page Region.
  8. In the Analytics element, set the value of the implementationClass attribute to the fully qualified class name of the Java class that implements the analytics provider. This value defaults to com.tridion.smarttarget.analytics.GoogleAnalyticsManager, the implementation class for Google Analytics, which Experience Optimization ships with.
  9. In the Analytics section, specify parameters for the analytics provider you specified in the implementationClass attribute. If you chose the default Google Analytics provider, set values for the following subelements:
    ElementDescription of value
    ServiceAccountEmailAddressThe e-mail address you created in the Google Developers Console
    PrivatekeyPathThe full path and filename of the P12 key you created
    AccountIdThe ID of the Google Analytics account you created
    TrackingIdThe Tracking ID of the Google Analytics account
    ViewIdThe View ID of the view you created in Google Analytics
  10. If you use the default Google Analytics provider, in the CustomDimensions subsection, also specify the IDs of the custom dimensions you created in the subelements:
    ElementDescription of value
    ExperimentIdExperiment ID
    InstanceIdInstance ID
    PublicationIdPublication ID
    PageIdPage ID
    RegionIdRegion ID
    ComponentIdComponent ID
    ComponentTemplateIdComponentTemplate ID
    ChosenVariantChosenVariant
  11. Leave all other elements and attributes set to their default values.
  12. Save and close smarttarget_conf.xml.