Výdejový script reklamy Interface: sssp

sssp

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

Members

(static) _getDotInstance

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

(static) _setCustomPath

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

(static) appendPawToElement

Appends pawHTML to an element
Version:
  • 3.139.4
Source:

(static) conf

[deprecated] Object representing current configuration. Read-only.
Version:
  • 3.139.4
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.139.4
Source:

(static) existSessionCookie

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

(static) getPawHTML

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

(static) getVastData

Geet VAST related data (tags, ...) from "anywhere". Returns Promise (syncing from top) -> works in top level and also embeds.
Version:
  • 3.139.4
Source:

(static) init

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

Methods

(static) clearData()

Clear sklikData from window object
Version:
  • 3.139.4
Source:

(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).
iframeStaticServer String If the server for iframe src 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
serviceIdForAllZones String assign to all ad zones the serviceId with specified string
callCallbackOnError Boolead defaultly set false, if true the callback function in ad position will accept only one parameter
Version:
  • 3.139.4
Source:

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

(static) getPageViewId()

Retrieve page view ID from config (web is Single-Page Application (SPA))
Version:
  • 3.139.4
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.139.4
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.139.4
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.139.4
Source:

(static) setPageViewId(pageViewId, resetVisibilityElements)

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
resetVisibilityElements Boolean Optional flag to reset visibility elements
Version:
  • 3.139.4
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.139.4
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.139.4
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.139.4
Source: