CQ organizes ads:
Brand
└──>Campaign
└──>Teaser
Fox organizes correspondingly:
Brand (ex. NFL, /content/fsdigital/(NFL|*))
└──>Campaign (ex. Right Rail, /content/campaigns/*)
└──>Teaser (ex. Coke, Mt. Dew)
multiple teasers may associate with a campaign and multiple campaigns may
associate with a brand.
Segments /etc/segments/:
when segments are defined for teasers they provide extra definition for
display. Use segments to 'show mt dew ads only on the home page', 'prioritize
coca-cola for the right rail', 'exclude sprite from campaign below the top
nav on channel pages'.
FsPageModel
is defined in transitions.js
$ grep -ir --include=*.js fspagemodel ./foxsports
/main_async/source/app/transitions.js: window.FsPageModel = pageModel;
_g
is defined in the file granite_shared_override.js
NOTE files w/ CQ defintions used by ads *may only be viewed in crxde.
These files can not be found in the source of the repository.
These files include the following:
/libs/cq/personalization/clientlib/kernel/source/segmentmanager/segmentmanager.js
/libs/cq/personalization/clientlib/kernel/source/shared/clientcontextmanager.js
/libs/cq/personalization/components/clickstreamcloud/clickstreamcloud.jsp
$CQ
and CQ_Analytics
are defined in the CQ library file kernel.js
http://wem.help.adobe.com/enterprise/en_US/10-0/wem/developing/extending-cq-analytics.html
http://wem.help.adobe.com/enterprise/en_US/10-0/wem/developing/clickstream_cloud.html
http://dev.day.com/docs/en/cq/5-4/developing/clickstream_cloud.html
ClickstreamcloudManager
is a legacy object from Day CQ. Adobe renamed it toClientContextManager
. 'Same object is referenced by CQ_Analytics.CCM
good resource for testing the ads
http://local.foxsports.com:4502/content/fsdigital/fscom/nfl.html?wcmmode=disabled
templates that load ads:
apps/*/components/*/advertising/msnAdvertisement/msnAdvertisement.jsp: require('ads').loadMSNAd(newDivID);
apps/*/components/*/advertising/nativeTeaser/nativeTeaser.jsp: require('ads').nativeAdInit('<%=properties.get("./redirectURL","")%>','<%=properties.get("./displayNewWindow","")%>','<%=properties.get("./adPosition","4")%>');
apps/*/components/*/advertising/overlayteaserconfig/overlayteaserconfig.jsp: require('ads').overlayAdInit(<%=frequencyCap%>,<%=hours%>,<%=mins%>,<%=timeout%>);
apps/*/components/*/advertising/ribbonAdvertisement/ribbonAdvertisement.jsp: require('ads').ribbonAdInit();
templates that initialize ads component
apps/cq/personalization/components/teaser/content.jsp
fscom/components/content/advertising/interstitialTeaser/content.jsp
fscom/components/content/article/articleFooterTeaser/articleFooterTeaser.jsp
this script also inits ads component :(
scripts/main_async/source/app/views/photo.js
ads.bindEvents
both classes and styles are defined in layout specific way and will break
when layout is easily changed by rotating or resizing viewport :(
ads.ribbonResized
method body is unintelligible. inefficient jquery chaining should be
removed. Similar problems in overlayAdInit, OverlayAd, AdInit
ads.overlayAdInit
timers at the bottom of the method. This method should be rethought.
ads.updateCookie (COMPLETED)
should be improved -possible problems modifying cookies with pre-persisted expiration
generateTPImage, openFSAdLink
methods are global. they are not exported with the ads definition.
var $bodyElement = $('body');
reference is obtained to window in same way. is it necessary?
each ad should be a represented as a self-contained object. (COMPLETED)
much logic here avoids using ad object (persisting/mutating configuration
options in the document, looping through elements... )
these make sync calls for the ads templates...
no hook is provided by these. maybe they should be redefined,
foxsports/foxsports-core-ui/src//main/content/jcr_root/apps/fscom/components/content/advertising/interstitialTeaser/content.jsp: final String TEASER_SUFFIX = "/_jcr_content/par.html";
foxsports/foxsports-core-ui/src//main/content/jcr_root/apps/fscom/components/content/article/articleFooterTeaser/articleFooterTeaser.jsp: final String TEASER_SUFFIX = "/_jcr_content/par.html";
foxsports/foxsports-core-ui/src//main/content/jcr_root/etc/designs/fsdigital/foxsports/scripts/main_async/source/adengine/CUSTteaser-client.js: var TEASER_SUFFIX = "/_jcr_content/par.html";
this file defines CQ_Analytics.Utils.load*() and many other methods
tricky file also uses jquery to augment the document in specific ways
possibly the worst script in the application:
apps/fscom/components/content/advertising/clientlib/utils.js
grep for files containing CQCCMObjArr. These are areas of campaign config for the ads
They are edited to push teaser data intended for initializeTeaserLoader() into the
array CQCCMObjArr
Where does dapMgr come from?
'dapMgr':'http://ads1.msads.net/library/dapmsn'