Výdejový script reklamy Interface: sssp

sssp

Public object sssp exposing API methods for working with Seznam ads.
Version:
  • 3.41.0
Source:

Members

(static) _getDotInstance

Private method for debugging and testing purposes only returns SSP's current DOT instance
Version:
  • 3.41.0
Source:

(static) _setCustomPath

Sets custom resources paths for debugging and testing purposes only
Version:
  • 3.41.0
Source:

(static) appendPawToElement

Appends pawHTML to an element
Version:
  • 3.41.0
Source:

(static) conf

[deprecated] Object representing current configuration. Read-only.
Version:
  • 3.41.0
Source:

(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.
Version:
  • 3.41.0
Source:

(static) existSessionCookie

Detects if a session cookie was set for a Seznam partner website
Version:
  • 3.41.0
Source:

(static) getPawHTML

Returns pawHTML for all DSP types except Sklik, OGAR & ONEGAR
Version:
  • 3.41.0
Source:

(static) init

Manually initialize SSP. Use only when `window._sspDoNotInit` has been set to a truthy value before running ssp.js.
Version:
  • 3.41.0
Source:

Methods

(static) config(config)

Main configuration method. Accepts an object describing website-specific config.
Parameters:
Name Type Description
config Object Configuration object
Properties
Name Type Description
webId Number Used to configure the CMP dialog
site String Current site
protocol String Set protocol to match your site's configuration. Defaults to "https".
documentWriteOverride Boolean Disable replacement of native document.write() method. Required for ads with embedded scripts to work. Defaults to true.
source String Set traffic source. Websites receiving traffic from Seznam are required to set this to value according to UTM parameter value in URL.
server String Server host to request ads from. Defaults to "ssp.seznam.cz" (development only).
staticServer String If the server delivering static files differs from the main adserver, specify it here (development only).
adblock Boolean Flag, that turn on (true) or off (false) antiadblock
ab Object
requestErrorCallback function Callback function that SSP calls when an xhr request fails
preparePositionsCallback function Callback function is called If the session started by the user's arrival by clicking from news feed to homepagi is valid Seznam.cz.
premium Boolean Premium flag
rusId Number Seznam User Id
said String Encrypted Seznam User Id
badge Boolean If true, then the `premium`, `sid`, `said` can get from badge
test Boolean Testing mode for partners
cidsAutoSend Boolean If true, then collect CIDs from response
Version:
  • 3.41.0
Source:

(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.)
Version:
  • 3.41.0
Source:

(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.
Version:
  • 3.41.0
Source:

(static) getPageViewId()

Retrieve page view ID from config (web is Single-Page Application (SPA))
Version:
  • 3.41.0
Source:

(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)
Version:
  • 3.41.0
Source:
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
Version:
  • 3.41.0
Source:

(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
Version:
  • 3.41.0
Source:

(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
Version:
  • 3.41.0
Source:

(static) setSessionCookie(media)

Set session cookie to mark valid session to continue serving Seznam ads
Parameters:
Name Type Description
media String utm media name
Version:
  • 3.41.0
Source:

(static) updateAdContainerId() → {Object}

Updating element / container ID according to zoneId (if adRepository[item].ad.id = falsy) in adRepository (affects all positions satisfying condition)
Version:
  • 3.41.0
Source:
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.
Version:
  • 3.41.0
Source: