Salesforce knowledge how to track more with pkb2

Uploaded on


  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. How to track more with PKB2 Appexchange package? Francois Lopitaux Product Manager @flopitaux in/flopitaux
  • 2. Summary • This customization allow you to store one record per article view on PKB2. You can then create trending report about most popular article, unique visitor report, average article view per visit and more. WARNING! This customization is going to create one record per article view on your public web site. These record are going to use data storage space. You may need to clean them based on your web site traffic. • Pre-requirement: • Public Knowledge for Web (PKB2) deployed, 059QxXEAU
  • 3. Step 1: Define different type of Feedback • On Article Feedback Object, create a new pick list field named: “Type” with 2 values, Feedback and View. Set Feedback as default.
  • 4. Step 2: Update PKB Controller • In PKB_Controller Apex page, add a new method: public void UpdateExternallyViewed() { if (viewingArticle) { String fs = (feedbackSourceOptions.contains(feedbackSource) ? feedbackSource : null); PKB_Article_Feedback_Deflection__c afd = new PKB_Article_Feedback_Deflection__c( Article_ID__c =, Article_Number__c = theKad.articleNumber, Article_Title__c = theKad.title, Session_ID__c = sessionId, Type__c = 'View', Feedback_Source__c = fs, Keyword_Searched__c = urlSearchQuery, Article_URL__c = ''+ '?popup=true' ); insert afd; } }
  • 5. Step 3: Update VF Template to call the method. • Edit VF Template page, by default, the page is called “Pkb_Template” • Add the action attribute in the apex:page: <apex:page cache="false" standardStylesheets="false" showHeader="false" sidebar="false" standardController="KnowledgeArticle" extensions="pkb_Controller" action="{!UpdateExternallyViewed}">
  • 6. Step 4: Create Report and Dashboard using Article Feedback Object • Create new Report using Article Feedback Object. • Main useful field on Article Feedback Object: • Session ID: Automatic Cookie generated at each new web session. It allow to track session and how many visit you get as how many article view per visit. • Keyword: search keyword used to find this article • Source: page from which article has been viewed. • Article Number, Article Title, Article ID