Adsense: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Description ==
== Description ==
Note: This document applies to AppStudio 4.2.1 and later. AdSense may not work with older versions of AppStudio due to changes in Google's API.


The AdSense control is used to display an advertising message from Google’s AdSense service. If the user clicks on the ad, it will leave your app and go to the advertiser’s page. Depending on AdSense’s inventory, you may get paid for the click.
The AdSense control is used to display an advertising message from Google’s AdSense service. If the user clicks on the ad, it will leave your app and go to the advertiser’s page. Depending on AdSense’s inventory, you may get paid for the click.


To use this, first sign up with [http://Google.AdSense.com Google.AdSense.com]. Once you have an account, create a Content Ad (''not'' Mobile content). Then fill the customer and slot into the control's properties. Note that if the customer clicks on an ad, your program will end and the customer will be taken to the ad's website. Make sure you keep your current state saved so you can restart.
To use this, first sign up with [https://www.google.com/adsense Adsense]. Once you have an account, create a Content Ad (''not'' Mobile content). Then fill the customer and slot into the control's properties. Note that if the customer clicks on an ad, your program will end and the customer will be taken to the ad's website. Make sure you keep your current state saved so you can restart.


You must also add the following link to 'extra headers' in Project Properties.
You must also add the following link to 'extra headers' in Project Properties.
Line 12: Line 10:
</pre>
</pre>


Ads will only appear if you are running from a server that is registered to your AdSense account. Be sure to read Google’s terms and conditions to use this service. To see a working NSB/App Studio app using AdSense, go to http://www.nsbasic.com/i/AdSense. Click on the link - we get some money when you do!
Ads will only appear if you are running from a server that is registered to your AdSense account. VoltServer can be used as a site. Be sure to read Google’s terms and conditions to use this service. To see a working AppStudio app using AdSense, go to https://adsense-wets-correctly.volt.live/. Click on the link - we get some money when you do!


== Properties ==
== Properties ==
Line 20: Line 18:
| Client || Supplied by AdSense. Fill your client number in here.  
| Client || Supplied by AdSense. Fill your client number in here.  
|-
|-
| format || The format of the ad. This is supplied to you by AdSense.  
| format || The format of the ad. Sizes are "320x50","320x100","200x200","200x250","300x250".
|-
|-
| height || This is defined by the format of the ad.
| height || This is defined by the format of the ad.
|-
|-
| slotname || Supplied by AdSense. Fill the slotname in here.
| slot || Supplied by AdSense. Fill the slotname in here.
|}
|}



Latest revision as of 15:31, 25 February 2021

Description

The AdSense control is used to display an advertising message from Google’s AdSense service. If the user clicks on the ad, it will leave your app and go to the advertiser’s page. Depending on AdSense’s inventory, you may get paid for the click.

To use this, first sign up with Adsense. Once you have an account, create a Content Ad (not Mobile content). Then fill the customer and slot into the control's properties. Note that if the customer clicks on an ad, your program will end and the customer will be taken to the ad's website. Make sure you keep your current state saved so you can restart.

You must also add the following link to 'extra headers' in Project Properties.

  <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

Ads will only appear if you are running from a server that is registered to your AdSense account. VoltServer can be used as a site. Be sure to read Google’s terms and conditions to use this service. To see a working AppStudio app using AdSense, go to https://adsense-wets-correctly.volt.live/. Click on the link - we get some money when you do!

Properties

Client Supplied by AdSense. Fill your client number in here.
format The format of the ad. Sizes are "320x50","320x100","200x200","200x250","300x250".
height This is defined by the format of the ad.
slot Supplied by AdSense. Fill the slotname in here.

Example

(no code needed)

Output

(ad appears)

Related Items

PayPal