Google AdSense enables you to
serve targeted ads on your websites or apps to a wide array of end
users. AdSense is used across a variety of Web products and social
networking sites like Facebook and Google Plus. You can use a small
snippet of JavaScript placed in an HTML file to serve Google AdSense ads
on your pages and apps. Google AdSense and Facebook have different
terms of service, so operating properly under both will help keep your
accounts in good standing.
Create Code and HTML File
Log in to your Google AdSense (adsense.google.com) account.
Click the "My Ads" tab and click "New Ad Unit" to generate a new ad code connected to your AdSense account.
Edit
and customize size and display settings on your ad by tweaking the
settings Google AdSense offers, and then click "Save and Get Code."
Copy
the code and paste it into a new or previously created HTML file of
your app or Web page. Paste the AdSense JavaScript code into the section
of your HTML code where you wish the ad to be displayed. Save this HTML
file to your Web server and copy its URL.
Facebook Implementation
Log
in to your Facebook Developer (developers.facebook.com) account and
click "Set Up New App" from the top right corner of the window.
Write
a name for your application, accept Facebook's terms and conditions,
and then confirm your developer account with either your linked credit
card or mobile phone.
Fill the new application form with your app's name, the intended use and category, and then click "Save Changes."
Click
"Facebook Integration" and fill out the required fields. Copy the URL
from your HTML file that contains the AdSense code and paste it into the
Canvas URL field. This directs your Facebook app to your AdSense code.
Click
"View App Profile Page" then click "Add to my page" and choose which
pages you would like to add the Facebook app to. Click "Close." Return
to your app's homepage and verify the AdSense ads are displayed.
No comments:
Post a Comment