App/Site Integration Troubleshooting

From Adfonic Wiki
Jump to: navigation, search

Contents

I integrated the ad code, but the response I get back says "Error: No ad available"

This is not necessarily an error. There are many reasons you may not be receiving an ad in your ad slot.

The most common cause of this error, if you're using one of the standard code templates, is simply that no advertisements in the Adfonic network match the criteria for your site or app at the present time. This can be based on the user's location, the type of device, or even frequency capping (advertisers only allow the same ad to be shown to the same user a certain number of times). You may want to check the ad management page on the Adfonic site and see which ads might apply to your site or app. If you have turned on manual ad approval, ensure that you have approved ads.

If you don't think the above applies to your situation, the key things to check are the following:

  1. Ensure that your request includes the device user agent (usually the h.user-agent parameter)
  2. Ensure that your request includes the external IP address of the originating user (usually the r.ip parameter). In particular, make sure this isn't referring to your server's IP address. IP address of the end user. If not specified, the IP address of the requesting connection is used. It must be an external IP address.
  3. Ensure that all other HTTP headers have been included the response. In particular, the "X-Forwarded-For" header can be important in determining the true location of the user.
  4. If you've done a custom integration, make sure you're properly URL-encoding all the parameters of your request. The user agent, for example, may not be properly recognised if it is not URL-encoded.

Why am I getting the response "Error: No user-agent supplied"?

Check that you are sending Adfonic the correct/valid user-agent of the device in the ad request. Incorrect or spoofed user-agents will later be rejected on click-through.

What's the difference between sample code and a SDK?

These are loose distinctions, to be fair. In general, sample code is snippets of code that you can insert into your site or app in order to enable Adfonic functionality. This approach is typically fairly lightweight, in that you don't need to add any additional libraries to your site or app to make them work.

Using a SDK (Software Development Kit) is a somewhat more involved process, which may dictate some of the way your application or site is set up and tends to come with more code (in the form of libraries or modules) that need to be deployed or embedded.

There are advantages to both approaches as SDKs often provide more extensive functionality and can be used in a variety of ways. You should look into the options available for your development platform and make your own decision about the way to proceed.

How does Adfonic determine the size of a banner to display

By default, the size of a banner is dictated by the display width of the device the ad is being served on. The supported banner sizes follow the MMA guidelines, and (in width x height in pixels notation) are 300x50, 216x36, 168x28, and 120x20. Adfonic uses the device user agent to automatically look up the display width of the end user's mobile device, and picks the largest size that will display properly.

If you want to create an ad slot that does not follow this convention (for example, a 168x28 ad slot within an iPhone app), you'll need to use the "t.constraints" parameter to define the exact width and height required. For more information on formatting this value, please see the Ad Server API.

How do I get an adSlotId?

You will require an account with http://adfonic.com and to have entered your site/app details under Add site or app. Then you can get access to your ad slot id from Ad integration. Select your site or app, then the ad slot. You should now see your "Ad slot details" and the ad slot id is the "Unique Identifier”.

My ad slot is verified but all I see is a "Congratulations" message. What's wrong?

Adfonic's editorial team reviews newly submitted sites and applications before making them live on the network.

Sometimes I see a HTTP 401 error response to my site's ad request. What does this mean?

Adfonic blocks certain user-agents and IP addresses from receiving ads. This is primarily done for search indexers (crawlers) and other bots. To make sure we don't record impressions or clicks for this non-human traffic, the server will reject the request with a 401 response code.

Why do I get a HTTP 401 error on the click-through?

Please check that the user-agent and IP address are the same on both the click-through and the impression.

Can you fill Opera Mini user-agents?

With regards to the opera mini user-agents, by passing the HTTP_X_OPERAMINI_PHONE_UA header (or its equivalent in your environment) in addition of HTTP_USER_AGENT you will see a better fill rate.

I still can't figure out the issue. How can I get help?

You can reach the Adfonic technical support team on support@adfonic.com.

Personal tools
Namespaces
Variants
Actions
App/Site Integration
Ad Campaign Tracking
Adfonic API
Troubleshooting
Toolbox