Public object
sssp
exposing API methods for working with Seznam ads.Members
(static) _getDotInstance
Private method for debugging and testing purposes only
returns SSP's current DOT instance
(static) _setCustomPath
Sets custom resources paths for debugging and testing purposes only
(static) appendPawToElement
Appends pawHTML to an element
(static) conf
[deprecated] Object representing current configuration. Read-only.
(static) displaySeznamAds
Detects an active Seznam partner session. Intended for partner websites
to check for traffic generated by Seznam and display ads according to the
traffic source.
(static) existSessionCookie
Detects if a session cookie was set for a Seznam partner website
(static) getPawHTML
Returns pawHTML for all DSP types except Sklik, OGAR & ONEGAR
(static) init
Manually initialize SSP. Use only when `window._sspDoNotInit` has been set to
a truthy value before running ssp.js.
Methods
(static) clearData()
Clear sklikData from window object
(static) config(config)
Main configuration method. Accepts an object describing
website-specific config.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | Configuration object
Properties
|
(static) extendVisibilityTracking(callbackAdData)
Add positions from callback ad into positionsStore for visibility measurement
Parameters:
Name | Type | Description |
---|---|---|
callbackAdData |
Array | Array of positions with id and visibility URL. |
(static) getAds(positions, opt)
Main method for calling and displaying ads. Allows requesting and displaying
a single zone (single object as the first parameter) or multiple zones by
passing an array of zone objects.
Parameters:
Name | Type | Description |
---|---|---|
positions |
Object | Array.<Object> | Object or array with zones configuration |
opt |
Object | Additional request configuration (AMPHTML, etc.) |
(static) getAdsByTags()
A simpler method for requesting and displaying ads on the page. It doesn't
require to pass an array or object with zone configuration, instead it scans
the DOM for HTML elements with "data-szn-ssp-ad" attributes and creates the
object pased to getAds method.
(static) getPageViewId()
Retrieve page view ID from config (web is Single-Page Application (SPA))
(static) getRenderedAds(watcher) → {Object|Array|function}
Gets info about rendered positions/ads (= content of positionsStore). Watcher for future updates can be registered.
Parameters:
Name | Type | Description |
---|---|---|
watcher |
function | callback to be called inside done() function (optional) |
Returns:
-
object
- Type
- Object
-
object.data - array of positions (basic info)
- Type
- Array
-
object.removeWatcher - funtion to be called for watcher removal (optional)
- Type
- function
(static) processAdData(ad, data)
Renders an ad or invokes a callback.
Parameters:
Name | Type | Description |
---|---|---|
ad |
Object | single ad returned by ssp server |
data |
Object | position definition |
(static) served(servedUrls)
Attempts to hit each provided URL in array in order to count metrics (miss,
impress, visible)
Parameters:
Name | Type | Description |
---|---|---|
servedUrls |
Array | Array of URLs as strings |
(static) setPageViewId(pageViewId)
Set page view ID. If provided, pageview ID will be set to the value of
the argument. If not, the script will generate one (usually the desired
behavior).
Parameters:
Name | Type | Description |
---|---|---|
pageViewId |
String | Optional pageView ID |
(static) setSessionCookie(media)
Set session cookie to mark valid session to continue serving Seznam ads
Parameters:
Name | Type | Description |
---|---|---|
media |
String | utm media name |
(static) updateAdContainerId() → {Object}
Updating element / container ID according to zoneId (if adRepository[item].ad.id = falsy) in adRepository (affects all positions satisfying condition)
Returns:
object
- Type
- Object
(static) writeAd(ad, data)
Inserts ad to page according to parameters passed.
Parameters:
Name | Type | Description |
---|---|---|
ad |
Object | Advert object as retrieved from server. |
data |
Object | Object representing all configured zones on page. |