Develop > Presentation layer > Customize marketing
Add an e-Marketing Spot to a store page (Management Center)
Procedure
- Determine on which JSP files the e-Marketing Spot will display. The e-Marketing Spot can be added to multiple JSP files.
- Determine where on the JSP file to place the e-Marketing Spot.
- Copy the sample e-Marketing Spot JSP snippet into a new JSP file inside of the store Web application.
The WebServiceeMarketingSpotDisplay.jsp sample snippet is available under the following directory:
- WC_INSTALL\samples\Snippets\web\Marketing\Campaigns
- WCDE_INSTALL\samples\Snippets\web\Marketing\Campaigns
- Customize the sample e-Marketing Spot to fit the layout of the JSP files.
- Within the e-Marketing Spot code, give the e-Marketing Spot a name.
Name e-Marketing Spots descriptively so that the name includes the location and purpose, for example, HomePageRow1Ads, or CheckOutPageRecommendation. This helps to reduce confusion about which page the e-Marketing Spot is on and what it displays. If necessary, add numbers to the name to differentiate between two e-Marketing Spots appearing on the same page. E-Marketing Spot names must be valid Java identifiers. You must use this same name when registering the e-Marketing Spot in the database using the Management Center.
- Add the e-Marketing Spot to the JSP file by dynamically including the e-Marketing Spot using the JSTL <c:import> tag structure with any associated parameters. Your code should look similar to the following example:
<c:import url="${jspStoreDir}include/WebServiceeMarketingSpotDisplay.jsp"> <c:param name="emsName" value="ShoppingCartPage" /> <c:param name="catalogId" value="${WCParam.catalogId}" /> </c:import>If you are not using JSTL, use the <jsp:include> tag. By using a dynamic include tag to add the e-Marketing Spot to the store JSP, the Dynacache feature can be enabled, so that the content of the JSP file, excluding the e-Marketing Spot, will be cached.
To avoid running the e-Marketing Spot snippet for each page load, see Enable JSP snippet caching for more information.
- If you require more than one e-Marketing Spot per JSP file, repeat steps 2 through 6.
- Create the e-Marketing Spot in the database using the Management Center.