Previous Thread
Next Thread
Print Thread
Hop To
#258303 04/14/2016 3:49 PM
Joined: Sep 2006
Posts: 89
P
journeyman
journeyman
P Offline
Joined: Sep 2006
Posts: 89
Greetings,

How to incorporate Amazon CPM ads into forum. In the past I just put static banners in the forum header and that is not a problem but haven't had experience with non-static forms of advertising.

The Amazon code appears to be javascript (see below)
Code
<script type="text/javascript" language="javascript" src="//c.amazon-adsystem.com/aax2/getads.js"></script>
<script type="text/javascript" language="javascript">
//<![CDATA[
aax_getad_mpb({
  "slot_uuid":"9febd96b-2078-4146-b54a-be14fd7c03c4"
});
//]]>
</script>

Would it be safe to just incorporate this code into the forum header, or do I need some other means??

Thanks
Charles

Last edited by Gizmo; 04/15/2016 4:16 PM. Reason: Added [code] tags.
Joined: Sep 2006
Posts: 89
P
journeyman
journeyman
P Offline
Joined: Sep 2006
Posts: 89
Sorry - looks like I put this into the wrong forum. Admin, please move if you like, to "Website Monetization" forum or whatever. Thanks.

Still need help, though !

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
You should add external code to the "Default Footer" section of the Control Panel (CP -> Display Settings -> General -> HTML Includes -> Default Footer) as you would want your page to load before any offsite content.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Sep 2006
Posts: 89
P
journeyman
journeyman
P Offline
Joined: Sep 2006
Posts: 89
Thanks Gizmo,

Can the code be used by some other means, like in a custom island and displayed in the sidebar ?

thanks

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Well, you COULD place the code in any of the custom insert fields or in a sidebar island, however you really want offsite script code in your forum footer so the page doesn't hang for your users if there is a latency issue with the provider of the code (as if the code is lagged in displaying it could stop any content from loading after the external coding has been loaded in the user's browser).

This bit should be in your footer:
Code
<script type="text/javascript" language="javascript" src="//c.amazon-adsystem.com/aax2/getads.js"></script>

This bit should be wherever you want the external bit to show (in this case, the ad):
Code
<script type="text/javascript" language="javascript">
//<![CDATA[
aax_getad_mpb({
"slot_uuid":"9febd96b-2078-4146-b54a-be14fd7c03c4"
});
//]]>
</script>

The offsite code only needs to be called once whereas the other bit can be placed as many times as you want to use it (following their policy, mind you).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (Ruben), 1,057 guests, and 268 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)