Ads or discounts do not appear on the Web site
The ads or discounts you created and expected to see on your Web site do not appear.
Solution
You can troubleshoot this problem in one of two ways:
To use the TraceScores.asp file
Using the DumpContentList.asp file
To use the TraceScores.asp file
Copy the TraceScores.asp file from Program Files\Microsoft Commerce Server\SDK\Samples\Marketing\Debug into the virtual directory for your site.
Modify the code that creates the ContentSelector object to add a line to include the TraceScores.asp file.
Add a line that sets the Trace property to True.
Add a line that calls the TraceScores subroutine.
Code Example
The following code example for the TraceScores.asp file contains the added lines in boldface font:
<!-- #include file="TraceScores.asp" -->
<%
' Create a ContentSelectorObject
Set CSO = Server.CreateObject("Commerce.ContentSelector")
CSO.Trace = true
' Use the GetContent method to get some content. Use the dictionary
' previously created in the Global.asa and referenced through the
' Application collection.
Set Ads = CSO.GetContent(Application("CSFAdsContext"))
' Ads is a SimpleList containing the selected content.
' Write the content to the page, if any.
For Each Ad in Ads
Response.Write(Ad)
Next
Response.Write("<P>")
Call TraceScores(CSO)
%>
Output Example
When tracing is enabled, all modifications to content item scores are tracked. The ad modifications found by the TraceScore.asp file are shown in boldfaced font in the following example:
ad: Volcano erupts (item_id=1) score: 1.028331
Commerce.CSFAdvertisingNeedOfDelivery,=1.89,Paid Ad Need of Delivery.
Commerce.CSFHistoryPenalty,*0.54,Reselect penalty applied
ad: Cuckoo clock (item_id=2) score: 1.112223
Commerce.CSFAdvertisingNeedOfDelivery,=1.89,Paid Ad Need of Delivery.
Commerce.CSFHistoryPenalty,*0.59,Reselect penalty applied
ad: MSPress (item_id=3) score: 1.012156
Commerce.CSFAdvertisingNeedOfDelivery,=2.02,Paid Ad Need of Delivery.
Commerce.CSFHistoryPenalty,*0.50,Reselect penalty applied
ad: Trey Research (item_id=4) score: 1
Commerce.CSFAdvertisingNeedOfDelivery,=1.00,House Ad Need of Delivery (Weight)
If the ad you expected to see does not appear in the trace, then it was not loaded into the cache. In Commerce Server Business Desk, in the Publish Campaigns module, republish the campaign to the server. If the ad still does not appear, check the following:
Check the start and end date for the ad.
Ensure that the customer, campaign, and campaign item are active.
Note
- When the TraceScores flag is set to On, the performance of Content Selection Framework (CSF) pipelines is significantly degraded.
See Also
Campaign items do not appear as expected on the Web site
Using the DumpContentList.asp file
The DumpContentList.asp file is another tool you can use to troubleshoot problems with threads and discount features. This tool displays all the ads or discounts that are currently loaded into memory and all their properties. It also shows the schema of the ContentList object. It can be used to dump the contents of either a ContentList object or a ContentListFactory object.
To use DumpContentList.asp
Copy the DumpContentList.asp file from Program files\Microsoft Commerce Server\SDK\Samples\Marketing\Debug into the virtual directory for your site.
Modify the code that creates the ContentSelector object to add a line to include the DumpContentList.asp file.
Add a line that calls the DumpContentList subroutine.
Code Example
The following example shows the added lines in boldface font:
<!-- #include file="DumpContentList.asp" -->
<%
' Create a ContentSelectorObject
Set CSO = Server.CreateObject("Commerce.ContentSelector")
' Use the GetContent method to get some content. Use the dictionary
' previously created in the Global.asa and referenced through the
' Application collection.
Set Ads = CSO.GetContent(Application("CSFAdsContext"))
' Ads is a SimpleList containing the selected content.
' Write the content to the page, if any.
For Each Ad in Ads
Response.Write(Ad)
Next
Response.Write("<P>")
Call DumpContentList(CSO.Value("Order").Value("_Content"))
%>