Quick Guide to installing SmartTarget
The Getting Started tutorial describes how to quickly set up and install SmartTarget.
Before you begin
The Quick Guide requires you have:
- A fully-functioning SDL Tridion Content Manager and Content Delivery system—see the Quick Guide to installing SDL Tridion.
- Experience Manager running on a staging Web site—see the Quick Guide to installing SDL Tridion.
About this task
Installing SmartTarget is split into 5 main areas:
- Installing SmartTarget on the Content Manager
- Installing Fredhopper
- Installing the SmartTarget Web service
- Configuring the Content Deployer
- Setting up the Web site (IIS)
Step 1—Installing SmartTarget on the Content Manager
Procedure
- Access the SmartTarget installation media.
- Browse to the Content Manager folder and double-click the Install SmartTarget 2014 shortcut.
- Follow the instructions to install (the installer does not require any inputs) and click Finish at the end. You are asked to reboot your Computer.
- After rebooting, open your browser and you will see that the Content Manager Explorer has been updated and a new navigation item Targeting has been added to the slide out navigation.
- Target Types control the security of Publication Targets. You need to add Manage Promotions to available permissions if you are not an administrator to see the Promotions List added in the Publication Target. You will need to find the right Target Type added in the Publication Target.
- Open Template Builder and add the Add to SmartTarget Template Building Block (TBB) to your Component Templates to publish content to Fredhopper.
The Content Manager installer installs the SmartTarget TBBs and also modifies the Publisher to allow more information to be added to published packages, required when publishing content to Fredhopper.
Step 2—Installing Fredhopper
Before you begin
Make sure you have JDK 1.7 installed and have set JAVA_HOME in your computer environmental variables.
Procedure
- Go to the Fredhopper Learning Center.
- Go to https://extranet.fredhopper.com/downloads/deployment/ and download the deployment ZIP file.
- Unzip the package.
- Create a
topology.txtin your Fredhopper config folder, for example,C:\fredhopper\config, to create the different instances in Fredhopper:
Where:# The topology file defines your indexing and live servers # instance name | host | preset | indexer | comment SmartTarget|localhost|1|-|Indexer and Preview environment for demo setup SmartTargetLive|localhost|2|SmartTarget|Live Query Server for demo setupSmartTargetis the Indexer Server (for getting content into Fredhopper)SmartTargetLiveis the Query Server (for getting content out of Fredhopper)
- Open a command prompt and run the following command in the fredhopper folder to start the deployment agent:
bin\deployment-agent
- Open up another command prompt and run the following command to create your instances as specified in the topology file (in this case SmartTarget and SmartTargetLive):
bin\setup-cluster - In the C:\fredhopper\data\instances\SmartTarget folder, create a folder
\custom. - Access the SmartTarget installation media
- Copy
configuration-management-rest-extension.jarandsmarttarget_api_extension.jarto the\customfolder.
- In the C:\fredhopper\SmartTarget\data\fas-xml-incremental folder, create a folder
\catalog01. - Copy the
metadata.xmlfile to the\catalog01folder.
Themetadata.xmlfile has the set of default fields needed by SmartTarget to use Fredhopper. You can run a command to process the file as described in the main SmartTarget documentation, but it will also be processed when you first publish Components to Fredhopper. - Copy the
trigger-types.xmlandbusiness.xmlto C:\fredhopper\data\instances\SmartTarget\config folder.
- Copy the
STJob.kjbfile to the C:\fredhopper\data\instances\etl folder.
- Start up the SmartTarget or SmartTargetLive instance using the command:
orbin\instance SmartTargetbin\instance SmartTargetLive - Copy the configs and data across from one instance to another (that is, from SmartTarget to SmartTargetLive) using the command:
bin\fresh-index-to-live SmartTarget - Publish some content to Fredhopper.
- Browse to the Fredhopper Business Manager:
Use the credentials admin/admin to log on. (The Business Manager connects to the Indexer Server.)ttp://localhost:8180/fredhopper/admin/
Step 3—Installing the SmartTarget Web service
The SmartTarget Web service is what is used for the communication between Tridion Content Manager and Fredhopper's index server.
Procedure
- Access the SDL Tridion installation media.
- Depending on your preferred technology:
- On a .NET platform, unzip the Web service package and create a new Web site in IIS
- On a Java platform, deploy the WAR file from the roles folders.
- Copy your configuration files to your Web application:
cd_ambientcd_dynamiccd_storagecd_linkcd_Web servicecd_waicd_license
- Access the SmartTarget installation media
- Copy the following SmartTarget JAR files to your
/libfolder:smarttarget_api_webservice.jarsmarttarget_core.jarsmarttarget_entitymodel.jarsmarttarget_odata_cartridge.jar
- Copy the following third-party JAR files to your
/libfolder:commons-codec.jarcommons-discovery.jarcommons-httpclient.jarcommons-lang.jarcommons-logging.jarjdom.jarjersey-client.jarjsr181-api.jaroro.jar
- Copy the config file
smarttarget_config.xmlto theclassesorconfigfolder. Make sure the file is configured to point to the Indexer Server. - In the
cd_ambient configfile, add the reference to thesmarttarget_odata_cartridgewhich is the connection to Fredhopper:<Cartridge File="smarttarget_odata_cartridge_conf.xml" /> - Assuming that the Web service and Fredhopper are on the same machine this is
http://localhost:8180, your configuration list should look something like the following:
Note: As the SmartTarget Web service is used to talk to Fredhopper, it does not matter what storage you have set in thecd_storage.xmlconfig, but you can also add the SmartTarget JARs and configs to an existing Session Preview Web service as long as you do not forget to add the cartridge reference in thecd_ambient.xmlconfig file. - Add the following log settings to your logback file:
<!-- Appender --> <appender name="rollingSmartTargetLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${log.folder}/smarttarget.%d{yyyy-MM-dd}.log</fileNamePattern> <maxHistory>${log.history}</maxHistory> </rollingPolicy> <encoder> <pattern>${log.pattern}</pattern> </encoder> <prudent>true</prudent> </appender> <!-- Logger --> <logger name="com.tridion.smarttarget" level="${log.level}"> <appender-ref ref="rollingSmartTargetLog"/> </logger> - Add the URL of the Web service to a Publication Target: when you go to a Publication Target, and will notice that a Targeting tab is now available in which you need to specify the Web service used to talk to Fredhopper:
- Add a meaningful Title for the connection, for example Staging.
- The Content Delivery Endpoint URL is the Web service, for example
http://tri2008r2.ams.dev:83/odata.svc. - Enter an oAuth user name and password if this has been set up for security in the Ambient Data Framework configuration file of the Web service.
- The Default Promotion List defines the list opened when you click the Targeting navigation item.
Step 4—Configuring the Content Deployer
Procedure
- Publish Components to get data into Fredhopper—the Components must be published as Dynamic Component Presentations, which you need to set in the Component Templates.
- Open Template Builder and add the Add to SmartTarget Template Building Block (TBB) to your Component Templates to publish content to Fredhopper.
- Open the
cd_deployer_conf.xmlconfiguration file in a text editor. - Add SmartTarget modules to the
<Processors>element:<Processor Action="Deploy" Class="com.tridion.deployer.Processor" Phase="post-transaction"> <Module Type="SmartTargetDeploy" Class="com.tridion.smarttarget.deployer.FredhopperDeployerModule"> <Transformer Class="com.tridion.deployer.TCDLTransformer"/> </Module> </Processor> <Processor Action="Undeploy" Class="com.tridion.deployer.Processor" Phase="post-transaction"> <Module Type="SmartTargetUndeploy" Class="com.tridion.smarttarget.deployer.FredhopperUndeployModule"/> </Processor> - Add the following tag bundle element in the
<TCDLEngine>element:<TagBundle Resource="com/tridion/smarttarget/tcdl/tagbundle.xml"/> - Save and close
cd_deployer_conf.xml. - Copy the following SmartTarget JAR files to your
/libfolder:smarttarget_core.jarsmarttarget_entitymodel.jar
- Copy the following third-party JAR files to your
/libfolder:commons-codec.jarcommons-discovery.jarcommons-httpclient.jarcommons-lang.jarcommons-logging.jarjdom.jarjersey-client.jarjsr181-api.jaroro.jar
- Copy the config file
smarttarget_config.xmlto theclassesorconfigfolder. Make sure the file is configured to point to the Indexer Server (you need to specify where the Content Deployer needs to put the XML packages for Fredhopper).
- Configure your logback file.
Step 5—Setting up the Web site (.NET Web Application)
Procedure
- Go to your staging Web site.
- Copy the following SmartTarget cartridge files to your
/libfolder:smarttarget_session.jarsmarttarget_smarttarget.jar
- Copy the following SmartTarget JAR files to your
/libfolder:smarttarget_core.jarsmarttarget_entitymodel.jar
- Copy the following third-party JAR files to your
/libfolder:commons-codec.jarcommons-discovery.jarcommons-httpclient.jarcommons-lang.jarcommons-logging.jarjdom.jarjersey-client.jarjsr181-api.jaroro.jar
- If you are using IIS, copy the following DLLs:
Tridion.SmartTarget.dllTridion.Smarttarget.Interop.dll
then open the Web applicationweb.configfile and add the following line to the pages, controls element:<add tagPrefix="SmartTarget" namespace="Tridion.SmartTarget.Web.UI" assembly="Tridion.SmartTarget" /> - Copy across your
smarttarget_config.xmlfile to your config folder (your Web site needs to know where to query Fredhopper).Note: In the above example, 9180 is the SmartTargetLive instance as set up in thetopology.txt. If you are just setting up test machine, you can specify 8180 in thesmarttarget_config.xml, which means you will actually using one instance (one instance as an Indexer and Query Server and therefore you do not have to start up SmartTargetLive instances). Obviously, this depends on the type of system you want to set up.
- Add the following log settings to your logback file:
<!-- Appender --> <appender name="rollingSmartTargetLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${log.folder}/smarttarget.%d{yyyy-MM-dd}.log</fileNamePattern> <maxHistory>${log.history}</maxHistory> </rollingPolicy> <encoder> <pattern>${log.pattern}</pattern> </encoder> <prudent>true</prudent> </appender> <!-- Logger --> <logger name="com.tridion.smarttarget" level="${log.level}"> <appender-ref ref="rollingSmartTargetLog"/> </logger> - In the
cd_ambient_conf.xml, add references to the cartridges.
- If you are using Audience Manager, add the following line to use Contacts and Personas in Experience Manager:
<Cartridge File="audiencemanager_cartridge_conf.xml"/>