How do I install the widget on my WordPress site?

    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.

    How do I install the widget on my Blogger?

    For Blogger sites, you will need to manually install the widget onto your template for it to display beneath each post on the article pages.

    1. Go to the “Layout” page in your Blogger admin and remove all of Content.ad gadgets that might currently be installed on your layout.
    2. Go to the “Template” page and select the “Edit HTML button” to edit your site’s code.
    3. Paste your Content.ad widget’s installation code after the following code:
      <b:includable id=’comments’ var=’post’>

      If the code above doesn’t work, please try this one:
      <b:includable id=’comment_picker’ var=’post’>

    4. After you paste your widget’s installation code, be sure to click on the orange “Save Template” button and check if the widget appears on your site.

    Given the variety of Blogger templates, these instructions may or may not apply to your template. If you run into any issues, please contact support for help.

    How do I install the widget on my website?

    (Note: If you’re using WordPress, you may prefer to install our plugin.  If you’re using Blogger, we provide more specific instructions for installation.)

    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.

    What widget configuration options can I set?

    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

    Example

    <div id="contentad01234"></div>
    <script type="text/javascript">
      (function() {
        var params =
        {
          id: "821fb445-6e5e-47fd-9548-c91708f89a4a",
          d:  "dGVzdGluZzMyMS5jb20=",
          wid: "01234",
          clientId: "[your code to pull the utm_campaign value]",
          clientId2: "[your code to pull the page title]",
          cb: (new Date()).getTime()
        };
    
        var qs=[];
        for(var key in params) qs.push(key+'='+encodeURIComponent(params[key]));
        var s = d.createElement('script');s.type='text/javascript';s.async=true;
        var p = 'https:' == document.location.protocol ? 'https' : 'http';
        s.src = p + "://api.content.ad/Scripts/widget2.aspx?" + qs.join('&');
        d.getElementById("contentad01234").appendChild(s);
      })();
    </script>

    How can I load the widget from the document head or an external JavaScript file?

    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:

    <script type="text/javascript">
        (function(d) {
            var params =
            {
                id: "[Your ID value]",
                d:  "[Your D value]",
                wid: "[Your WID value]",
                cb: (new Date()).getTime()
            };
    
            var qs=[];
            for(var key in params) qs.push(key+'='+encodeURIComponent(params[key]));
            var s = d.createElement('script');s.type='text/javascript';s.async=true;
            var p = 'https:' == document.location.protocol ? 'https' : 'http';
            s.src = p + "://api.content.ad/Scripts/widget2.aspx?" + qs.join('&');
            d.getElementById("contentad[Your WID value]").appendChild(s);
        })();
    </script>
    

    In the body of the page, place the following code where you would like the widget to appear:

    <div id="contentad[Your WID value]"></div><!-- Load Widget Here --></div>
    

    If you are unable to add HTML to the page:

    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.

    How do I install a pop-up widget on my site?

    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:

    1. change a widget from any other widget type to a pop-up widget,
    2. change a widget from one pop-up style to another, or
    3. 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.

    What widget implementations are prohibited?

    As a publisher in the Content.ad system we are entrusting you to display our advertisers’ ads in a responsible manner.

    Please note that the following widget placements are prohibited:

    • Ad units that take up more than 50% of the page on load. (above the fold)
    • Ad units that require a click in order to view content or play a video.
    • Ad units that pop over page content on page load.
    • More than 5 Content.ad widgets on a single page.

    In addition, deceptive implementations, auto click mechanisms and incentivized clicks are considered non-compliant and will result in an adjustment on unpaid earnings.

    If you are unsure about whether a widget is compliant with our guidelines please reach out to support or your account representative for approval.

     

    How can I make a widget for my AMP mobile site?

    Content.ad supports AMP (Accelerated Mobile Pages). You can create an AMP tag using the format below with parameters from the standard installation code.

    Create a widget in your Content.ad account

    Select a banner style for your widget. AMP requires fixed sizes. Use the format below inserting the appropriate parameters from the widget’s installation code and the size you selected.

    AMP Tag Format

    <amp-ad
       width=[Width of Ad Widget]
       height=[Height of Ad Widget]
       type="contentad"
       data-id="[Ad Widget GUID]"
       data-d="[Ad Widget Domain ID]"
       data-wid="[Ad Widget ID]">
    </amp-ad>

    Supported Widget Call Parameters

    Name Required Description
    width Yes The width of the widget in pixels.
    height Yes The height of the widget in pixels.
    type Yes The type of AMP tag. Used “contentad”.
    id Yes The unique identifier for your account (API Key).
    wid Yes The unique identifier for your widget.
    d Yes The unique identifier for your domain.

     

    Example

    <amp-ad
       width=300
       height=250
       type="contentad"
       data-id="821fb445-6e5e-47fd-9548-c91708f89a4a"
       data-d="dGVzdGluZzMyMS5jb20="
       data-wid="012345">
    </amp-ad>

     

    If you are experiencing problems, please contact support@content.ad