When stuff changes, it's described here.
Major dependency and build pipeline update
- Builds on Node v16
- Updated dependencies to latest
- Refactoring for coverage and necessary updates
Legacy click through parameter cleanup
- Added
verbose_click_data
config option to appendok_ch
,ok_cx
,_okjr
parameters to click through url when enabled (disabled by default) - Added
utm_click_data
config option to appendutm_source=okanjo
andutm_medium=smartserve
parameters to click through url when enabled (enabled by default) - Removed
utm_campaign
click through parameter - Changed
_okjr
parameter to be base64 encoded (prevent issues with mod_security) - Changed inline buy click through parameters to be prefixed with
ok_
(ok_expandable
,ok_frame_height
,ok_frame_width
,ok_ad_size
)
Added option to disable CSS injection entirely
- Okanjo.js: Updated getLocation logic to handle more iframe edge cases
Added option to disable CSS injection entirely
- Placement.js: Added
no_css
option to disable template css injection - examples/dfp*.html: Added
beforeLoad
optional hook for executing or injecting custom templates before loading placements (v3.2.0)
- Update sid if requested
- Okanjo.js: Added getLocation helper
- Metrics.js: Updated to use getLocation helper
- Added widget positional data
- Metrics.js: Added addWidgetInfo and fluent helper
- Placement.js: Add widget data in metric events
- Added automatic passing _okjr in click-through urls
- Use server CIDs for vendor tracking params
- Set SameSite and Secure params on session cookie
- Use server generated cids
- Added build task option to skip version bump
- Fixed CTA color overrides
- Added support for splitfilled widgets
- Added testing option to placements (flags metrics as test metrics)
- Added test coverage for splitfill and testing flag
- Removed yarn.lock, replaced with package-lock.json
- Updated docs
- Added
slab
template support for products - Refactored
slab
base styles to stand-aloneokanjo.slab.less
, for reuse - Fixed an issue in block2 where the price accidentally inherited font in some cases
- Updated the builder example to support products
- Added
inherit
theme, to inherit container font instead of using a sans (modern) or serif (newsprint) based font - Refactored the way theme is applied in block2 markup; moved to root level from element level
- Added basic widget configurator example, builder.html
- Added
responsive
size toslab
. - Updated tests for coverage
- Added new article template:
slab
- okanjo.ui: Added
fitImages
helper to enable object-fit css polyfill on images for old browsers - Placement: Added
template_variant
to enable variant modes in templates - Placement: Added
_enforceSlabLayoutOptions
design rules for slabs - Articles.Block2: Exported the article.block2 markup to be reusable
- Articles.Block2: Updated UI to include
fitImage
option - Updated tests for coverage
- Added DOM visibility check as prerequisite for viewability
- Added support for shortfill settings and reporting
- Updated unit tests for shortfill coverage
- Removed hard coded protocol for pixel indicators
- Added support for
url_paths
andnot_url_paths
filters
- Added support for size
billboard
(970x250)
Housekeeping:
- Moved docs from okanjo-docs to README.md
- Removed bower from build flow
- Added yarn lockfile
- Updated build flow and tests to work without bower
- Added travis-ci integration
- Updated gulp-git to latest to work with node 8+
- Adjusted element position algorithm in an attempt to reconcile differences with mobile browsers and zooming
- Fixed widget impression firing before content was rendered
- Added missing viewport info on various impression events
- Added polyfills for old IE (support down to IE 10, Edge 14)
- Removed unused domready shim
- Fixed typo in parameter sent on placement content fetch
- Added utm_source/utm_campaign params to click-through urls
- Added various response metrics to events
Added support for viewable impression events
- Added: okanjo.ui.getElementPosition will include
err
if the element position is unavailable - Added: okanjo.ui.getPercentageInViewport to return what % (0-1) of the element is in the viewport
- Added: Placement constants and handlers for tracking viewable impressions on widgets, products, articles, and adx
- Fixed: Placement configuration
url_referrer
was ignored if manually configured
- Added: metrics include window location to disambiguate referral traffic
- Fixed: sid does not need to be included on every event in a bulk report
- Changed: Moved placement content route
- Fixed: metadata values with long values would cause api error (they're truncated now)
- Fixed: placement title truncation was not updated to work with the new resource selector names
- Added: test to ensure long meta values are truncated
- Changed: Refactored product, article and adx block2 styles into a common block2 stylesheet. Products/Articles/Adx will offer their own extensions to the core block2 styles, reducing overall code payload and improves ease of customization
- Fixed: inconsistent declined meta tagging
- Fixed: Missing automatic page view metrics
Total refactor of the placement framework. Everything has changed.
- New platform: We've significantly beefed up our SmartServe tech, and have a brand new backend ready to handle content requests.
- One Placement to Rule Them All: Instead of several different widgets, there is now a single widget: Placement.
- Modernization: The framework has been updated to ES6, using Babel to compile our classes back down to ES5 for the internet.
- Fully Tested: We need to be able to rapidly add enhancements to our placement tech, and that usually means we'll break something. Everything is now 100% unit tested covered.
- The Product widget has been deprecated. It will convert the old configuration to the Placement configuration, but you should change your markup to use Placements instead.
- The Ad widget has been deprecated. It will now only show the dynamic product view, since support for creatives has been removed. You should update your markup to use Placements instead.
- Caching has been removed. This always proved to be problematic and we didn't feel the need to keep it.
- Polyfills have been removed. As part of our modernization, we will only support browsers with 1% or more of world-wide traffic. Goodbye, IE 8, 9 and 10.
- Attributes:
data-page-start
,data-page-size
have been removed. Usedata-skip
anddata-take
instead.
- Use of JSONP has been replaced with XHR.
- Placements can now be configured on the server. This allows dynamic changes to configurations to be made without contacting your devs.
- Placements can now serve different types of content depending on type.
- Template names should be prefixed with the content type they render.
- Metrics now report in batches and save locally in the event of network issues or navigation events.
- Widget configuration is substantially more flexible and robust.
- Tons of bug fixes and other enhancements.
- Added pixels to templates
- Updated Google Ad markup
- Added buy url param pass through for better reporting
- Added product-block2 classes to article markup for backwards compatibility
- Added support for experimental article matching mode
- Prioritized 720x90 over 300x250 to better fill a wider space
- Default ADX backfill ads to be centered in their original container
- Enabled ADX backfill via placement testing
- Fixed missing product ids in normalized event data
Metrics
- Refactored event normalization to its own helper
- Added truncation helper to limit properties to ensure acceptance
Product Widget
- Refactored all events to use metric normalization to correct consistency and reduce redundancy
- Fixed leaking of callback param into config property on api exec
- Refactored click through url function to convert event into an actual url
- Fixed missing instance id in the deprecated sidebar template
- Added js build version to interaction events
- Disabled caching API responses by default
- Added js build version to the okanjo object and reported metrics
- Added
url_category
sense mode parameter to indicate the taxonomy/genre of the article - Added support for back-filled products when running in sense mode
- Removed deprecated
text
sense mode parameter from product config
- Removed offer/price schema attributes from template to avoid issues where articles list prices in google search results.
- New size
auto
option for product block2 templates, allows full-width lists for more native placements. - Added opt-in parameter
backfill
to show a display ad when no products match the page content.
- Added instance ids for page and widgets
- Added ability to disable mobile popup functionality (use at your own risk!)
- Added placement test support to deprecated templates
- Fixed an issue with page argument parsing, when the arguments themselves are encoded poorly
- Added support for A/B placement testing and reporting
- Added metric cart object type
- Added shortid derivative helper
- Fixed edge case in tile display for products without a
sold_by
property
- Added support for custom cta text via product meta data key
cta_text
- Added click event positional data
- New block2 template for product blocks, supporting list and grid views for better ad formats (will become default in the near future)
- Block2 includes logic for enforcing ad format restrictions on style config, and custom cta colors
- Fixed broken console polyfill
- Fixed issue with product-single template where long words in product titles would overflow past tile boundaries
- Added template configuration fields:
size
,template_layout
,template_theme
,template_cta_style
,template_cta_text
, andtemplate_cta_color
- Added font stack variables to common.less
- Fixed bad mobile viewport dimensions
- Added ad server example code (original and minified)
Ad & Product Widget
- Added support for 3rd-party click tracking via the
proxy_url
parameter to an Ad or Product widget
Core
- Removed integration with Moat
Ad Widget
- Reordered widget impression to fire before product impression
- Fixed bad metadata in product impression event
Core
- Better error detection for detached elements when getting element position
Metrics
- Enhanced key detection when not setting a key globally
- Metrics: Automatically passes the source channel and context if provided in the page's url on events emitted by the page
- Product Widget: Pass through the widget channel and context when loading the buy_url or inline_buy_url so events can be properly attributed to the original source.
- Added a new, super simple event emitter class, allowing objects to emit events and developers to hookup integrations to the widgets
- The base widget class now extends from event emitter. Refactored the base widget away from prototype = { ... }
- The product widget will emit the
data
event when the browse/sense/id call completes. The raw response will the only event parameter. - The product widget will emit the
load
event when the widget completes initialization and products are rendered. The only event parameter is an object with propertyfromCache
to indicate whether the widget used cached content or not. - The product widget will emit the
error
event if the product data failed to be received. The error will be returned as the only event parameter. - Added
numFound
property to the product widget - Added referrer to metrics, when available
- Fixed an issue with IE being picky about getting positional rectangles of elements not attached to the DOM. Will now nag if this is the case.
- Allow overriding the page url in metrics trackPageView
- Refactored config to not clobber if it already exists, and merge properties instead.
- Added metrics build into the default build pipeline
- Allow the key to be set globally prior to loading okanjo-js
Core
- Refactored core to set properties on global okanjo object instead of set and replace. Easier conflict resolution.
Metrics
- Extracted automatic page view functionality to separate module for optional inclusion
- Added isolated build for metrics-only library, okanjo-metrics.js
Core
- Added util function to get the viewport size
- Exposed the objectToUri function in JSONP
Product
- Added positional data and inline metrics to interactions
- Added missing sid passing to the metric url for interactions
Metrics
- Added includeViewportInfo helper to return the viewport rectangle coordinates relative to the page
Metrics
- Replaced janky GA metrics with new v2 library to report better quality events
- Added positioning information to widget and product impressions
Ad Widget
- Added metrics v2 integration for widget load and product load
- Removed hardcoded channel references and used metrics constant
- Now sends the channel_context to the underlying product widget in addition to the channel
Product Widget
- Added channel_context as something that can be set during initialization. Defaults do the product widget's mode if not set
- Added metrics v2 integration for widget load, product load, and product interaction
- Added support for non-expandable functionality in product widgets
- Removed hardcodded channel references and used metrics constant
Base Widget
- Removed load tracking from the widget init process
Core
- Added new route for reporting metrics without pixels
- Added util function to get the page query and hash arguments as an object
- Cookie: Capitalized the param names, looks nicer
- JSONP: Added better shallow serialization of objects and arrays
- JSONP: Exposed the url builder as
JSONP.makeUrl
- Added util functions for getting an element's position and the page size
- Added util function for deep cloning an object with the option to merge properties into an existing array/object
Product Widget
- Fixed clobbering of price on formatted product, causing duplicate currency formatting and ultimately showing as $0.00
General
- Updated minifyCSS compatibility to not convert to points. clean-css/clean-css#654
- Added unminified dump of css for debugging to build directory
Product Widget
- Changed word-break:break-all to word-wrap:brake-word for better text handling
- Core: Added Array.filter IE polyfill
- Ad: Fixed an issue when setting expandable to a boolean value instead of stringified boolean
- Template: Added a context parameter to the render function, used to set the
this
context when calling a template's view closure - Widget: Fixed an issue generating the current page url
- Product: Added various CSS enhancements to for cross-site compatibility
Core
- Added util functions for detecting frames and mobile devices
- Replaced the getOuterHeight util function with getElementSize, so both width and height are accessible
Product Widget
- Updated interaction handling to popup the inline buy experience in a new window for applicable mobile devices
- Added various contextual parameters to the inline_buy_url: popup, expandable, frame_height, frame_width, and ad_size
- Added break for long run on titles on product widgets
Ad Widget
- Added the computed ad size to the template container and data model
Core
- Added preview s3 CDN deployment for testing upcoming changes and related gulp task
Ad Widget
- Uses the
product.single
template when dynamically rendering a product in an ad
Product Widget
- Added template
product.sidebar
for a vertically-stacking product tile view - Added template
product.single
for a scaling a single product to fit into a medium_rectangle ad size - Updated the product.block template to accept a template name for reuse across other templates
- Changed the text "Sold by" to "From" on product tiles for better semantic reading
Core
- Added util function
getOuterHeight
to get the height of an element - Added util function
ellipsify
to programmatically slice off text and add an ellipses, useful for multi-line overflow handling (won't break screen readers)
Product
- Updated product.block template to include more default styling to work better as-is
- Added buy button to the product.block template
- Added the seller name to the product.block template
- Updated overflow handling to use
ellipsify
for the title and standard css overflow for the seller name
Templates
- Added common
visually-hidden
mixin to make things invisible on a page but still visible to the DOM - Added common
ellipses-after
mixin to add an ellipsis after the element's content - Moved the clearfix mixin from core to common
- Updated modal.less to include from common instead of core
Core
- Removed Moat levels and slicers from the config
Moat
- Fixed level/slicer values not getting encoded during compilation
- Refactored the Moat URL generation logic to its own function, getTagUrl
Widget Base
- Updated trackMoat to accept options for levels/slicers and the element to stick the tag in
Product
- Added metrics_context constructor-only param to override the metrics reporting context
- Updated the Moat usage to insert per product tile including levels and slicers, instead of per widget
- Updated the product.block template to use the metrics_context value
Ad
- Updated Moat usage to include levels and slicers
- Added an override to set the metrics context of the embedded product widget (to the ad widget)
- Changed modal overlay logic to fixed position instead of absolute positioning to better handle edge cases on scroll-hacked websites
General
- Added IDEA linting hinting & fixes
- Removed support for IE7. Lowest IE support is now IE8.
Core
- Added
getScrollPosition
util function to get the current page scroll location - Moved template class detect logic to
detectClasses
util function - Added clearfix and inline-block LESS mixins
Modal
- Removed (customized) NanoModal
- Created a new modal UI from scratch to better facilitate cross-platform inline-buy functionality
Polyfill
- Re-enabled the IE8 Event preventDefault and stopPropagation shim
Ad
- Prefixed template key names with
ad_
- Added config params to override which markup templates to use when rendering the widget instance (
template_ad_main
andtemplate_ad_error
) - Added product template override params to pass-through to the product widget
Product
- Prefixed template key names with
product_
- Added config params to override which markup templates to use when rendering the widget instance (
template_product_main
andtemplate_product_error
) - Changed the class name given to the inline buy iframe to
okanjo-inline-buy-frame
- Updated inline_buy functionality to use the new modal
Templates
- Added warning when attempting to insert a stylesheet that is not registered
Widget Base
- Added a new step to the widget init workflow,
processTemplateOverrides
which handles overriding markup templates given in the widget configuration - Changed the init order so that configuration parsing occurs first, then overriding templates, then followed by ensuring the templates are registered.
- Added an additional note to the console when a template is fails the registration check, to check if the template was included.
- Fixed inconsistent data attribute
query
to beq
. - Fixed CSV handling to be consistent with
pools
,tags
, andcategory
.
- Enabled integration with Moat by default
- Fixed AWS S3 upload handling of UTF-8 files (workaround gulp-awspublish + bad charset handling)
- Better okanjo namespace conflict handling
- Fixed reference error in product sense mode if no URL was specified
- Better sourcemaps for the js bundle
- Updated Ad Widget modal to be re-center on screen resize.
- Added option
expandable
to indicate whether an ad should expand in a modal or remain in-unit. - Fixed close button for the modal to no longer initially be visible.
- Added CSS for the ad iframe when it is in-unit.
- Added option
disable_inline_buy
to disable inline buy functionality in ad and product widgets, if desired (e.g. to drive traffic to a marketplace instead of transact on the publisher's page)
- Updated JSONP object serializer to handle arrays slightly better
- Added support for Ad product pools, searches the global pool by default
- Updated Moat analytics support to inject per widget, currently disabled by default
- Removed duplicate Array.every polyfill
- Added key parameter to ad and product widgets
- Fixed: when automatically inserting a product widget into an ad, use the ad's key instead of assuming a global key is defined
- Fixed: call
findWidgetKey
afterparseConfiguration
in the widget init process, so the given key data element can be used
- Added new and improved version of the initial AdCommerce widget, the Ad Widget
- Added and integrated modified NanoModal library
- Added Array.every polyfill because IE sucks
- Added global okanjo Moat configuration (currently testing)
- Integrated asyncronous version of Moat into the framework
- Fixed okanjo.util.trim not actually returning the trimmed result
- Added okanjo.util.inherits to extend objects with support for old IE
- Fixed okanjo metrics to wait until the dom is loaded before starting on that
- Added widget base, for code reuse across new and existing widgets
- Refactored product widget to inherit basic functionality from the base widget
- Added inline_buy functionality to the product widget
- Added blockClasses option to render, to allow inserting classes on the widget element at render time
- Added escaped_inline_buy_url to the formatted product model, in case the view could make use of that
- Removed errant console.log in JSONP
- Ensure config.mode is always set on product widget
- Fixed ga analytics id in config
- Use window._gaq instead of internal
- Added product widget impression metrics
- Changed impression/interaction context ps to pw
- Initial import / setup