Description

The @site context query describes information about the site and page that is requesting the ad.

Example Usage

In order to be as contextually relevant as possible, some ads be desire the headline of the ad to change based on what site the ad is loading on.

.headline::before {
	content: 'Hey, You!';
	
	@site (domain: espn.com) {
		content: 'Hey, Sports Fan!';
	}
	
	@site (domain: gizmodo.com) {
		content: 'Hey, Gearhead!';
	}
	
	@site (domain: hbr.org) {
		content: "Hey, Smartypants!
	}
}

Available Features

Feature NameJavascript NameValueExample ValueDescription
loadedsiteLoadedbooleantrueBoolean that notes if the content page has loaded completely.
scrollingsiteScrollingbooleanfalseBoolean that notes if the content page is scrolling.
typesiteTypewebsite appsiteThe kind of content that the ad is loading within (i.e a website or an app).
domainsiteDomainstringgospecless.comThe full domain of the page requesting the ad.
hostnamesiteHostnamestringapp.gospecless.comThe full hostname of the URL.
urlsiteURLstringhttp://gospecless.com/pubishers/The full URL of the content page requesting the ad.
titlesiteTitlestringThis is an Article TitleThe full title of the page requesting the ad.
pathsitePathstring/publishers/The portion of the URL that defines the path to the current content.
protocolsiteProtocolstringhttp httpsThe protocol being used to request the parent page.
searchsiteSearchstringsearch=whatever&something=thatThe portion of the URL that comes after the '?' mark.
hashsiteHashstringanchorThe portion of the URL that comes after the '#' sign in the url.
widthsiteWidthnumber1024The width of the parent page document.
heightsiteHeightnumber5678The height of the parent page document.
scroll-xsiteScrollXnumber256How far the current parent page document has scrolled along the x-axis in pixels.
scroll-ysiteScrollYnumber3024How far the current parent page document has scrolled along the Y-axis in pixels.
screen-topsiteScreenTopnumber-254The distance from the top of the document to the top of the screen.
screen-rightsiteScreenRightnumber-20The distance from the right of the document to the right side of the screen.
screen-bottomsiteScreenBottomnumber-24The distance from the bottom of the document to the bottom of the screen.
screen-leftsiteScreenLeftnumber-10The distance from the left of the document to the left side of the screen.
viewport-topsiteViewportTopnumber0The distance from the top of the document to the top of the viewport.
viewport-rightsiteViewportRightnumber0The distance from the right of the document to the right side of the viewport.
viewport-bottomsiteViewportBottomnumber-3024The distance from the bottom of the document to the bottom of the viewport.
viewport-leftsiteViewportLeftnumber0The distance from the left of the document to the left side of the viewport.