/* * This is the popup campaign control file * This file defines popup campaigns. It relies on JavaScript objects defined in popupCampaignClasses.js * Before including this on a page, you must: * 1. Define a variable called thisNode, which specifies the node to which the page belongs; * 2. Import popupCampaignClasses.js * The first campaign defined in this file has comments describing what the following line[s] do. * TO CHANGE THE DOUBLECLICK CAP OR DOUBLECLICK TIMEFRAME, EDIT DClickCap and DClickTimeFrame IN THIS popupCampaignClasses.js */ // THIS DEFINES THE NUMBER OF INTERNAL POPUP CAMPAIGNS A USER CAN GET IN A SESSION AND A WEEK. // It applies to all internal campaigns and shouldn't need to be changed on a campaign-by-campaign basis // popupSessionLimit and popupIntensityLimit apply to internal popup campaigns ONLY var popupSessionLimit = 1; // Maximum number of popups user will see in a session var popupIntensityLimit = 2; // Maximum number of popups user will see in a week // DClickCap and DClickTimeFrame apply to DoubleClick popup and popunder campaigns. // They MUST be defined in popupCampaignClasses.js // STEP ONE: Define your campaign // You must create a new Campaign object var CRM_March_entain0 = new Campaign(); var TechSurveyOct02 = new Campaign(); // You must assign a unique name to the campaign CRM_March_entain0.setName('CRM_March_entain0'); TechSurveyOct02.setName('TechSurveyOct02'); // You may define a time frame for the launch window //format for time is (year,month,day,hour,minute,second) NOTE!-the month should be (month number-1) //expired CRM_March_entain0.setTime(new Date(2002,1,1,10,0,0),new Date(2002,3,8,0,0,0)); TechSurveyOct02.setTime(new Date(2002,9,28,11,30,0),new Date(2002,11,9,23,59,0)); //expired // You may target to REGISTERED and/or NOT_REGISTERED users; default: NOT_REGISTERED //CRM_March.setTarget(REGISTERED + NOT_REGISTERED); TechSurveyOct02.setTarget(REGISTERED + NOT_REGISTERED); // You may set the number of times per week this campaign can appear to a users (default: once) //CRM_March.setLimit(5); // You may change the base that is applied to the value of setFrequency (default: 7 days) //CRM_March.setFrequency(2 * pcm_DAYS); //Insight_Express_survey.setFrequency(14 * pcm_DAYS); // You may define the dimensions (x,y) of the popup window, default is 300x400 (defined in popupCampaignClasses.js) CRM_March_entain0.setDimensions(300,340); TechSurveyOct02.setDimensions(300,340); // the Mod is the frequency of survey delivery based on modulus. CRM_March_entain0.setMod(1); TechSurveyOct02.setMod(4); // You MUST create NodeToUrlMap objects for each node assignment. // You can apply the assignment to the FRONT, ARTICLE // You can make the assignment EXPLICITY (applies only to that node) or IMPLICIT (applies to that node and its children) // CRM_March_entain0 CRM_March_entain0.mapNodeToUrl( new NodeToUrlMap('Entertainment_front','http://www.washingtonpost.com/wp-srv/popjs/entertainment_incentive.htm', FRONT + EXPLICIT) ); TechSurveyOct02.mapNodeToUrl( new NodeToUrlMap('technology','http://www.washingtonpost.com/wp-srv/popjs/technology_survey.htm', FRONT + ARTICLE + IMPLICIT) ); // STEP TWO: Add your campaign to the campaignList campaignList = new Array(); campaignList[0] = CRM_March_entain0; campaignList[1] = TechSurveyOct02; if (typeof emergencyLoad != 'undefined') window.setTimeout("deliverCampaign(campaignList);",5000); else deliverCampaign(campaignList);