Quê Tôi
26-10-11, 11:36 AM
<!-- PUT THIS TAG IN THE head SECTION -->
<script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
<script type="text/javascript">
GS_googleAddAdSenseService("ca-pub-0000000000000000");
GS_googleEnableAllServices();
</script>
<script type="text/javascript">
GA_googleAddAttr("section", "world", "Featured", "film", "Interview", "Interviews", "My Day Job", "");
</script>
<script type="text/javascript">
GA_googleAddSlot("ca-pub-0000000000000000", "Homepage-Leaderboard");
GA_googleAddSlot("ca-pub-0000000000000000", "Bottom-Right-300x100");
GA_googleAddSlot("ca-pub-0000000000000000", "Bottom-Right-300x100B");
GA_googleAddSlot("ca-pub-0000000000000000", "Header-125x");
GA_googleAddSlot("ca-pub-0000000000000000", "Header-468x");
GA_googleAddSlot("ca-pub-0000000000000000", "Homepage-Middle-300x");
GA_googleAddSlot("ca-pub-0000000000000000", "Homepage-Right-300x100");
GA_googleAddSlot("ca-pub-0000000000000000", "Inner-145x");
GA_googleAddSlot("ca-pub-0000000000000000", "Inner-145xB");
GA_googleAddSlot("ca-pub-0000000000000000", "Inner-Sidebar-300x");
GA_googleAddSlot("ca-pub-0000000000000000", "Inner-Sidebar-Bottom-300x");
GA_googleAddSlot("ca-pub-0000000000000000", "National-News-160x600");
GA_googleAddSlot("ca-pub-0000000000000000", "Syndicated-Post-Advert");
GA_googleAddSlot("ca-pub-0000000000000000", "Top-Right-1-125x");
GA_googleAddSlot("ca-pub-0000000000000000", "Top-Right-2-125x");
GA_googleAddSlot("ca-pub-0000000000000000", "Top-Right-3-125x");
GA_googleAddSlot("ca-pub-0000000000000000", "Top-Right-4-125x");
GA_googleAddSlot("ca-pub-0000000000000000", "Related-News-Adsense");
GA_googleAddSlot("ca-pub-0000000000000000", "newpost-skyscraper");
</script>
<script type="text/javascript">
GA_googleFetchAds();
</script>
<!-- END OF TAG FOR head SECTION -->
Well I know this isn't the answer you're looking for, but I recommend that if you sell ad space and charge CPD, you should really be using a tool like Ad Manager to manage the advertisements from all of your customers. You can even serve their GAM code through Ad Manager and then have much more control over delivery, as well as reporting.
With that being said, you can have multiple pub ids on a page, however, I wouldn't make this a common practice since this is a workaround and as such, has potential to cause delivery problems. If you need to use multiple pub ids you would do so as follows:
<script type="text/javascript"
src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
<script type="text/javascript">
GS_googleAddAdSenseService("ca-pub-pubid1");
GS_googleAddAdSenseService("ca-pub-pubid2");
GS_googleAddAdSenseService("ca-pub-pubid3");
GS_googleEnableAllServices();
</script>
<script type="text/javascript">
GA_googleAddSlot("ca-pub-pubid1", "adslot");
GA_googleAddSlot("ca-pub-pubid2", "adslot");
GA_googleAddSlot("ca-pub-pubid3", "adslot");
</script>
Then continue to tag as normal with the appropriate fill slot calls for each slot.
The GS_googleAddAdSenseService(pubid) function enables your web page to display ads using the specified publisher ID (pubid). You need to call this function to specify any publisher IDs that may be used on the page. Then you also need to call the GA_googleAddSlot(pubid, name) function to define any ad slots on the page that are associated with each publisher ID. The ad slot must be specified here to link the ad slot to a specific account.
<script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
<script type="text/javascript">
GS_googleAddAdSenseService("ca-pub-0000000000000000");
GS_googleEnableAllServices();
</script>
<script type="text/javascript">
GA_googleAddAttr("section", "world", "Featured", "film", "Interview", "Interviews", "My Day Job", "");
</script>
<script type="text/javascript">
GA_googleAddSlot("ca-pub-0000000000000000", "Homepage-Leaderboard");
GA_googleAddSlot("ca-pub-0000000000000000", "Bottom-Right-300x100");
GA_googleAddSlot("ca-pub-0000000000000000", "Bottom-Right-300x100B");
GA_googleAddSlot("ca-pub-0000000000000000", "Header-125x");
GA_googleAddSlot("ca-pub-0000000000000000", "Header-468x");
GA_googleAddSlot("ca-pub-0000000000000000", "Homepage-Middle-300x");
GA_googleAddSlot("ca-pub-0000000000000000", "Homepage-Right-300x100");
GA_googleAddSlot("ca-pub-0000000000000000", "Inner-145x");
GA_googleAddSlot("ca-pub-0000000000000000", "Inner-145xB");
GA_googleAddSlot("ca-pub-0000000000000000", "Inner-Sidebar-300x");
GA_googleAddSlot("ca-pub-0000000000000000", "Inner-Sidebar-Bottom-300x");
GA_googleAddSlot("ca-pub-0000000000000000", "National-News-160x600");
GA_googleAddSlot("ca-pub-0000000000000000", "Syndicated-Post-Advert");
GA_googleAddSlot("ca-pub-0000000000000000", "Top-Right-1-125x");
GA_googleAddSlot("ca-pub-0000000000000000", "Top-Right-2-125x");
GA_googleAddSlot("ca-pub-0000000000000000", "Top-Right-3-125x");
GA_googleAddSlot("ca-pub-0000000000000000", "Top-Right-4-125x");
GA_googleAddSlot("ca-pub-0000000000000000", "Related-News-Adsense");
GA_googleAddSlot("ca-pub-0000000000000000", "newpost-skyscraper");
</script>
<script type="text/javascript">
GA_googleFetchAds();
</script>
<!-- END OF TAG FOR head SECTION -->
Well I know this isn't the answer you're looking for, but I recommend that if you sell ad space and charge CPD, you should really be using a tool like Ad Manager to manage the advertisements from all of your customers. You can even serve their GAM code through Ad Manager and then have much more control over delivery, as well as reporting.
With that being said, you can have multiple pub ids on a page, however, I wouldn't make this a common practice since this is a workaround and as such, has potential to cause delivery problems. If you need to use multiple pub ids you would do so as follows:
<script type="text/javascript"
src="http://partner.googleadservices.com/gampad/google_service.js">
</script>
<script type="text/javascript">
GS_googleAddAdSenseService("ca-pub-pubid1");
GS_googleAddAdSenseService("ca-pub-pubid2");
GS_googleAddAdSenseService("ca-pub-pubid3");
GS_googleEnableAllServices();
</script>
<script type="text/javascript">
GA_googleAddSlot("ca-pub-pubid1", "adslot");
GA_googleAddSlot("ca-pub-pubid2", "adslot");
GA_googleAddSlot("ca-pub-pubid3", "adslot");
</script>
Then continue to tag as normal with the appropriate fill slot calls for each slot.
The GS_googleAddAdSenseService(pubid) function enables your web page to display ads using the specified publisher ID (pubid). You need to call this function to specify any publisher IDs that may be used on the page. Then you also need to call the GA_googleAddSlot(pubid, name) function to define any ad slots on the page that are associated with each publisher ID. The ad slot must be specified here to link the ad slot to a specific account.