Visitor : 63

Read Comments

Google Adsense and Django Website integration

Django Hosting


Google Adsense is an excellent platform for monetizing your website. Even though the market is flooded with various other monetizing products , Google Adsense is the leader and way ahead of others when it comes to ease of integration and clarity of the product.

Getting google to approve listing of their ads on your site may be little tricky as the selection criteria is comparatively stringent. Nevertheless quality comes in with effort. Few pointers from my end for a easier approval process.

Tips for quick Adsense account approval

1. Keep your site simple and neat.

2. Post at least on alternate days to keep the traffic active on your site.

3. Do not use Sub domains as it will be rejected by the team

4. Add Google Analytics to your code to keep track of number of hits and it would be used as a quick reference tool by the Google Adsense team.

5. The domain should be active for at least 6 months 

6. Make sure the site is professional with all the links active and working

7. Maintain proper Meta data in your site. If your using Django make sure the layout file contains proper meta data tags. Use the following as reference.

 

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">    
<title> Enhancements to PO Document Type determination in ME59 ME59N:ERP Realm </title>
<meta name="title" content= "Enhancements to PO Document Type determination in ME59 ME59N" />
<meta name="description" content= "ME59 , ME59N are standard SAP transactions for converting PR to PO automatically either in the background or foreground when optimized procurement process is used. ie. PR automatically converted to PO when source of supply is assigned in PR.This document explains the various enhancement options available with these standard transactions." />
<meta name="keywords" content= "ME59, RM06BB10, RM06BB20, T160, T161A, ME_PROCESS_REQUISITIONS, bsart_best, ME_BSART_DET,SAP,Materials Management" />

8. Post professional or interesting stuff for better audience.

 

Ads.txt File

Once your site is approved by google for posting ads, google team may request you to add ads.txt file to the root of your domain. If you are using Django framework then this might be little tricky. There are multiple options but the easiest one is the following.

1. In the  urls.py add the following

url(r'^ads\.txt$', app.views.googleadsense, name='google_adsense'),

2. In the view.py add a new function and replace pub-XXXXXXXXXX with your publisher ID.

from django.http import HttpResponse

def googleadsense(request):
    return HttpResponse('google.com, pub-XXXXXXXXXX, DIRECT, f08c47fec0942fa0')

3. If everything goes well  https://example.com/ads.txt should display a text line with the above details in the HttpResponse.

Note that it may take a couple days for the error message to be removed from your adsense account.

 

Reference

"Authorized Digital Sellers, or ads.txt is an IAB Tech Lab initiative that helps ensure that your digital ad inventory is only sold through sellers (such as AdSense) who you've identified as authorized. Creating your own ads.txt file gives you more control over who's allowed to sell ads on your site and helps prevent counterfeit inventory from being presented to advertisers.We strongly recommend that you use an ads.txt file. It can help buyers identify counterfeit inventory and help you receive more advertiser spend that might have otherwise gone toward that counterfeit inventory."

https://support.google.com/adsense/answer/7532444?hl=en

 

 

 

 



Add Comments