SDL Tridion: How to enable Profiling and Personalization in 2013 using Tracking Keys

When attempting to setup Profiling and Personalization in Tridion, I have faced some challenges and once I was able to get it to work, I have made a small list of steps that were essential to finish this setup.

Here you can find the steps I have followed to be able to enable P&P in my SDL Tridion 2013 environment using Tracking Keys:

Add the cd_wai.jar to your deployer and website's lib folder;

Add the cd_wai_conf.xml to your deployer and website's config folder;

Update the cd_wai_conf.xml to include a reference to the host name, in other words, the location of your website. In my case, I have changed it to the following:

<Host Domain="localhost" Port="83" Protocol="http" Path="/"/>

In the same configuration file, ensure to enable Personalization, as follows:

<Personalization Enabled="true" Persistence="cookies">

Now in your CME, create your target groups, by selecting your publication folder where you would like to store the target groups. In my case, I have created 2 target groups: Windows and Mac.

Create a new Category and its keywords, in my case, I added a Category called 'Operating System', a keyword called 'Windows' and a second keyword called 'Mac';

Open each target group and in the 'Definition' tab and set the conditions that your group needs to meet to display certain content. In my case, I have defined: Include (Windows > 2), therefore if Tracking Key for 'Windows' is higher than 2, certain content will be displayed.

Publish the newly created Category;

Verify in the Tridion Broker database if the Category and Keywords were correctly published, by inspecting the TAXFACETS table:

Open your Page Template in Template Builder and ensure to add the 'Activate Tracking' Template Building Block. This TBB needs to be added before the 'Default Finish Actions' TBB.

Open your Component's Schema and add the Category to a text field and, as shown below, in the field details, ensure to have the box 'Values will be Selected from a List' checked, as well as, the 'Category' check-box checked:

Open your Component's Template and in the 'Tracked Categories' tab, add the created Category;

Open your Page and select a Component Presentation. Afterwards, select the 'Target Groups' tab and check the Target Groups that you would like to be able to see this component presentation.

Publish both the Page and Page Template;

Visit the published Page and check the Tracking_Keys table to verify if the value of the Tracking Key has increased;

Depending on the value on the Tracking_Keys, it will display the Component Presentation that was restricted to your target group, if the tracking key value meets the value that is set in the target group condition.

Note: When setting up P&P, it is important to keep in mind how Tridion calculates if the component should be displayed or not.

1. Tridion checks the cd_wai_conf.xml and verifies the increment value, by default it is set to 50:

<Keys Enabled="true" Increment="50" Decrement="1" Averaging="false" ComponentLinks="true"/>

2. Checks the current value in the Tracking_Keys table, in my case:

20 Windows 600 

3. Calculates Tracking Key Value (600) / Increment Value (50) = 12 

4. Takes this value 12, and checks the Target Group condition defined in Content Manager, in my case: Windows > 2

As this condition is met, my Component Presentation will be displayed in the website.

Thank you to R&D for the help in setting up this example and for providing this explanation!


Popular posts from this blog

SDL Tridion: Which folders do we need to ensure to exclude from anti-virus scanning to publish items successfully?

SDL DXA 2.0 Example Website: Images are not being displayed

SDL Tridion: Tips to troubleshoot and resolve the 'Throttling' status