Nitro’s platform is entirely self serve – that includes demo placements and debugging tools. Here’s a quick low down on what we have for your use.
Useful query strings for testing
We have several query params that will allow you to debug, force demo placements and otherwise augment your usage of Nitro. They are as follows:
?nitroads_debug=1 – enables debug logging in the dev console. Enter 2 for a more verbose “trace” mode. It is not recommended to set the log level to anything but silent in a production environment, except for limited testing.
?gdpr_debug=1 – triggers the ad script to surface the CMP as though you were a user within a GDPR country.
?usp_debug=1 – the same as the above, but for CCPA users.
?nitro_demo=1 – forces placeholder ads on the current page, helpful for testing on localhost.
The “demo” ad
Demo ads can be enabled with the string above, or by attaching “demo”: “true” to your createAd call. This will load a placeholder ad unit, based on the first size passed in the sizes configuration. It refreshes based on the refreshTime parameter (which defaults to 30 if unlisted). This currently does not work with the video-nc format.
Common setup issues #
I’ve just generated a placement on the dashboard – where do I put it?
To integrate a simple display ad, you take the output of our placement code generator and place it within the html of your page. The target <div> (generated by the placement code generator, displayed above the createAd block) goes wherever you’d like the ad to render on the page.
The createAd portion of the code only needs to be placed within the <body> of the page.
I’ve done the above and I still don’t see ads – what gives?
The first thing to check is to make sure that your header script is in place. To find your header script, navigate to your NitroPay dashboard and then to your Sites page under the Organization heading. Click your sites name under the “Name” column, in blue, and then navigate to the setup guide from there. The first step outlines your header script, which must be placed within the <head> of each page you want to be populated with ads.
My header script is there but there’s still no ads!
This is not uncommon – to check and make sure the ad scripts are running correctly, append ?nitroads_debug=1 to the end of your page URL. You can then check the output of our script in the console log of whatever browser you’re using. You should see messages that confirm that the ad script is loading and your placement IDs are running. If you’re not seeing any ads populate, it is likely that fill to your current user is expended. This can be due to your site having recently been set up and lacking full bidder coverage, or you could have exhausted the supply of ads visible to you. If you’re confused about any of these steps please contact our customer service team via the Intercom chat.
When setting up the sticky side rail, it isn’t rendering.
This crops up when the collision detection within the sticky side rails code discovers potential collisions on its path. Append ?nitroads_debug=1 to the end of the URL you are integrating on, and within the console log you will see a read out of what the problem elements are. You can then whitelist these elements using the railCollisionWhitelist.
I’ve placed an Anchor ad, but it isn’t showing up.
Contrary to the setup for our other placement types, the specialized anchor ad does not require a target <div>. Make sure you haven’t included one – the anchor places itself on the page.
I’ve placed multiple ads, but only one is rendering.
When placing multiple ads on a page it is imperative that the ad unit IDs be unique. This is the name of the target <div> generated on the placement code builder – and is declared in this portion of the code snippet – window[‘nitroAds’].createAd(‘test’, { – in this example, if you were to place multiple instances of the div id and createAd call for ‘test’ it would only populate a single placement. You must iterate the id for test (i.e. test-1, test-2, test-3) and carry over this iteration to each target <div> as well as ad unit ID.
I’ve placed a sticky-stack, but it isn’t generating multiple placements / it isn’t stacking / it isn’t sticky.
The sticky stack must be placed within a container that matches the height of the content you wish it to float besides, and the height of the sticky stack container must be initialized before the sticky stack code runs, since that is when it calculates number of placements and its overall behavior. The div the sticky-stack is within must also not be an overflow div. For other issues, please contact our customer support team.
My site is an SPA – how do I make my display ads function in accordance with best practices?
We recommend completely tearing down the existing <divs> for your placements and re-creating them whenever user navigation occurs. Make sure that these placements are completely removed and not just hidden – as this can lead to issues.