Category: Installation

For most WordPress users, the WordPress plugin is the simplest way to install and configure Content.ad on your site.

Simply download and install the plugin on your WordPress site. In the plugin settings, enter your WordPress key, which is provided in your Content.ad account information. This will link your Content.ad account with your WordPress plugin.

To add a widget to your site, create one in Content.ad or through the plugin. Then, click the “Placement” link under the widget and select where you want the widget to appear. Click “Update” when finished. Then, click “Activate” (next to “Placement”) to begin serving your widget on your site.

Under “My Widgets,” find the widget you’d like to place on your site and click “Installation Code.” Under “Universal (JavaScript),” your widget installation code is provided as a <script> tag. Copy this code and paste in on your website where you’d like the widget to appear.

That’s it! You can customize the appearance of your widget using the provided tools or by defining your own styles. Content.ad also supports various configuration options to give you more control over how your widget is served.

Supported Meta Tags
The Content.ad widget detects the title, image and URL for each page of internal content, but they can also be explicitly defined by using meta tags. Content.ad recognizes the following tags:

Name

Description

ca_title

The title that should be used by the widget when displaying the page as a recommended article.

ca_image

A full path to the image that should be used by the widget when displaying the page as a recommended article.

ca_url

The URL that should be used when sending users to a piece of content. By default the system uses the first URL it encounters but this can be controlled through the use of this meta tag.

Supported Widget Call Parameters

Name

Required

Description

Default Value

id

Yes

The unique identifier for your account (API Key).

None

wid

Yes

The unique identifier for your widget.

None

d

Yes

The unique identifier for your domain.

None

contentRating

No

Sets the maximum content rating of the ads that appear in the widget. Accepts “G”,”PG”,”PG-13″ and “R”.

widget setting

aggressiveImagery

No

Sets the maximum aggressive imagery of the ads that appear in the widget. Accepts “None”,”Low” and “High”.

widget setting

serve

No

Whether or not to serve a particular page as recommended content. Set to 0 on pages which should not be served as related content – such as a home or category page.

1

lazyLoad

No

Whether or not the widget should load after the rest of the page has completely loaded. When set to 0, the widget may load faster but it could also affect the performance of other elements on your page.

0

pubdate

No

The date on which a page was published. This can be used to filter out old content that you don’t want to be served. Format: yyyy-mm-dd hh:mm:ss

None

blockIntl

No

Whether or not the widget should return results for visitors outside of the US and Canada. When set to 1, the widget will not display for users outside of these countries.

0

blockMobile

No

Whether or not the widget should return results for visitors on mobile devices. When set to 1, the widget will not display for mobile users.

0

blockTablet

No

Whether or not the widget should return results for visitors on tablets. When set to 1, the widget will not display for tablet users.

0

loadMultiple

No

In the event that the same widget will be dynamically reloaded on the same page without a page refresh, this must be set to 1. Most implementations will not need to set this.

0

pre

No

Adds this value to the beginning of all links in the rendered widget. This is useful for adding macros when serving the widget through a third party ad service such as Google DFP.

None

internalTarget

No

Sets the value of the “target” attribute on internal links (more info).

_top

externalTarget

No

Sets the value of the “target” attribute on sponsored links (more info).

_blank

exitPop

No

When set to true, the widget will only appear when the user is about to leave the page. Required for Exit Pop widgets. More info

false

exitPopMobile

No

When set to true, the widget will only appear when the user scrolls up or reaches the bottom of the page. Required for Mobile Slider widgets. More info

false

exitPopExpireDays

No

When widget is an exit pop, sets the frequency that the widget appears for each user. Accepts a decimal defining the number of days. When not set, the widget appears once per session. When set to 0, it appears on every pageview.

None

clientId

No

Assigns a tracking parameter to any clicks generated from this impression. Accepts any string up to 64 characters.

None

clientId2

No

Assigns a tracking parameter to any clicks generated from this impression (separate from clientId). Accepts any string up to 64 characters.

None

Please note: The parameters clientId and clientId2 should not be user-specific values. More Info

The JavaScript installation code is designed to function in as many different environments as possible. However, if the code simply won’t work for you for whatever reason, such as limited access to the page’s source code or a conflict with the document.write statement, the simple, non-blocking solution detailed below may work for you.

At the bottom of your page, paste the following code (or include it in an external JavaScript file), replacing the brackets with the values from your universal installation code:

Skip the second step, and change the line document.getElementById("contentad[Your WID value]").appendChild(s); so that the value of getElementById is the ID of an element currently on the page inside of which you would like the widget to appear.

Pop-up widget styles differ from the other widget types in that each pop-up style has unique behavior that determines how and when the widget is loaded to the page. In order to achieve this, your widget’s installation code is altered to include this behavior.

As a result, you will need to obtain and update your current installation code from the corresponding widget anytime that you:

change a widget from any other widget type to a pop-up widget,

change a widget from one pop-up style to another, or

change a widget from the pop-up widget type to another type.

Exit Pop
When installed, the exit pop widget appears when the user’s mouse reaches the top of the browser window to navigate away from the page. By default, the exit pop only appears once per session for each user, but you can change its frequency using the “exitPopExpireDays” parameter described here: What widget configuration options can I set?

Mobile Slideup
The mobile slideup widget animates up from the bottom of the mobile device’s browser window once the user has scanned or read the page and scroll back up. This widget is eye-catching, but also unobtrusive and easy for the user to collapse. Like the exit pop, this widget will also utilize the “exitPopExpireDays” parameter when defined.