I want to add some Adsense in my website but nothing too much intrusive. I see some website with adsense like this :
How they do that ? The best I can do is :
That's ugly and big !
Here is the code that I use (from Google) :
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Homepage - Un Bon Matelas -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-6260603388131652"
data-ad-slot="5682235326"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Thanks you for your help
I think I found the solution. The ads I am talking about is actually called "Link units". I cannot be 100% sure because for now my ads are not yet verified (2-3 days according to Google) and I can only see a yellow rectangle, but it seems like this is the same shape :
For more info, check out this link : Link units - AdSense Help
EDIT :
I can confirm you :
Related
I'm trying to use the plugin
https://developers.facebook.com/docs/plugins/page-plugin/
to load the timeline of a page on a php site
I also created at https://developers.facebook.com
an app ... and I put it live
but nothing has changed.
it's strange because on some computers it works, on others it doesn't
how it doesn't work on mobile.
I don't understand why.
the error message makes me think that the problem is browsers blocking the plugin and I tried to follow this, to catch the problem.
Facebook Sdk blocked : How to detect if a user is using Ghostery?
the code taken from fb is the following:
<div id="fb-root"></div>
<script async defer crossorigin="anonymous"
src="https://connect.facebook.net/it_IT/sdk.js#xfbml=1&version=v15.0&appId=536891684570335&autoLogAppEvents=1" nonce="Y1MwGcHs"></script>
<div class="fb-page" data-href="https://www.facebook.com/autodriveskicup/" data-tabs="timeline" data-width="500" data-height="725" data-small-header="true" data-adapt-container-width="true" data-hide-cover="true" data-show-facepile="true">
<blockquote cite="https://www.facebook.com/autodriveskicup/" class="fb-xfbml-parse-ignore">
Autodrive Ski Cup
</blockquote>
</div>
the result can be seen here:
www.autodrive.org
Can anyone help me?
I just want the plugin to load the timeline
or alternatively be able to read the error and hide the fb div and show an alternative image when the plugin doesn't work
Similar to this question, I would like to test Google Adsense in a page to see how it impacts layout and performance, etc. before go-live. I would like to do this on https://localhost and on a demo site. However, my customer is using AutoAds, with markup that looks like this:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-1234567890",
enable_page_level_ads: true,
google_adtest: "on" //This doesn't seem to work?
});
</script>
Is there a way to test AutoAds on localhost and non-production sites? Related, is there documentation for google_adtest?
Yes and no ... more like no :) I still recommend you try.
So basically Auto Ads don't run right away, because Google needs time to analyze not only ur site's content, but also structure.
So because localhost is not a public domain, google structure crawler can't see ur site... However I do see live google ads on my localhost ... the non-auto- ads... Regular fixed size ads.
Also, auto ads is not very profitable
I'm correctly loading Facebook SDK with requireJS (https://developers.facebook.com/docs/javascript/howto/requirejs) because I see it in the console log message and because I can publish on users wall using FB.ui method so the hard work has been done ! But the tricky part is missing : I can't display the like and share buttons (https://developers.facebook.com/docs/javascript/quickstart).
I can see :
<div id="fb-root"></div>
is filled in after page load but the :
<div class="fb-like" data-send="true" data-width="450" data-show-faces="true"></div>
doesn't get anything inside !
What am I missing ? an initialization using FB.XX method ? No javascript error so don't know where to dig ...
OK found the answer 5 sec after posting after 1 hour searching ...
thanks to this page : https://github.com/thomaswelton/requirejs-facebook even if I don't use this plugin for now.
In my FB.init, I had to add the line :
xfbml : true
witch, you would certainly agree, it's very very clear that "xfbml" means "please activate my social plugin" ! I love when variable name doesn't means anything ;)
I have added Addthis widget to a website. Here is the autogenerated code which I have tweaked little bit:
<script type="text/javascript">
var addthis_config = {
"data_track_clickback": true,
services_compact: 'facebook, twitter,googlebuzz, digg, stumbleupon',
services_expanded: 'facebook, twitter,googlebuzz, digg, stumbleupon',
ui_cobrand: "ABC Company",
ui_header_color: "#ffffff",
ui_header_background: "#000000"
}
</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4dde778a54a20e05"></script>
<script type="text/javascript">
var addthis_share = {
templates: { twitter: 'check out {{title}} : {{url}} #ABC' },
url_transforms : { clean: true }
}
</script>
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_compact">
<img alt="Share" src="../images/icons/share.gif" /><img alt="ABC" src="../images/icons/financial_tip.png" />
</a>
</div>
I have added facebook, twitter, google buzz, StumbleUpon and Digg links inside the ADdthis compact and expandable widgets.
When I click the Share link, following window pop ups:
I dont want the Addthis footer to appear in the pop up window. I tried finding the div with jquery doc load and removing it..but it didnt help.
Other thing is when I click FB, it opens my account and the following message is displayed about posting on my wall:
Addthis is appending some garbage at the end of the shared url:
e.g after index.aspx starting from # to ;facebook ..it is appending some data that is irrelevant... how to fix it ..any idea...
If I share it on twitter, the login screen to twitter
I dont want the Addthis message in footer..how to hide/delete it
Similar to FB, when i login to my twitter account, some garbage is added to the end of the shared url:
Moreover, whenever i click any icon inside the compact Addthis list, Fb or twitter, a small window pop ups:
Can anyone help me with these.
THanks.
About twitter issue, you can use somthing like this..
<script type='text/javascript'>
var addthis_share =
{
templates: { twitter: '{{title}}: {{url}}' }
}
</script>
And change
<a class='addthis_button_tweet' tw:via='YOUR-USER-NAME'/>
I never tried other services. But have a look at Addthis API. I think you can find out something.
Malinda's answer is basically correct but doesn't explain what's going on - I think it's important to understand a bit more.
The question says, "Addthis is appending some garbage at the end of the shared url". This isn't garbage. The value after the #hashtag is a semi-random number generated by Addthis that can help you build really useful social media reports that can even show you which of your shares are re-shares - a critical component in modeling viral growth rates (which is what you want from social sharing). You can read more about that here: http://support.addthis.com/customer/portal/articles/381254-address-bar-sharing-analytics.
What Malinda's solution does is override the default Addthis Twitter template to omit this tracking data. That certainly works - you should just realize what you're giving up in terms of tracking your social media campaign.
As I understand it, Facebook's FBML should render html. But mine isn't. Here is my source code after viewing the page in the browser:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head id="Head1" runat="server"> <title>test</title>
</head>
<body onload="initFB();">
<script src="http://static.new.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"
type="text/javascript"></script>
<fb:login-button v="2" size="medium" onlogin="window.location='test.aspx'">Login with your Facebook account</fb:login-button>
<script type="text/javascript" language="text/javascript">
function initFB() {
FB_RequireFeatures(["XFBML"], function(){
FB.init("464 ... my api key here ... b62", "xd_receiver.htm");
});}
</script>
</body>
</html>
Here's the page: http://www.rebelstudent.com/test.aspx
Could it be the server? Is there any change that my host is blocking communication with Facebook somehow? Doesn't make sense because the facebook connect kinda works...the popup windows just doesn't go away. I'm pretty sure it's because these FBML tags aren't being rendered properly and so the "onlogin" function isn't getting called...
Anway, I'm new at this. Any help is appreciated because the facebook developer forums seem kind of dead.
I haven't done any work on Facebook so I don't have a direct answer for you, sorry. However, have you tried starting with a "Hello World" app? Basically remove everything that is not absolutely necessary for Facebook and try to display the text "Hello World" to the screen. Remove the script, the header, fb button, etc.
If you are able to get "Hello World" working, then just add small pieces of the application back in until it breaks. Then you will know exactly what it is that is breaking the output.
If you are not able to get "Hello World" to work, then you are missing a basic requirement. Perhaps somebody else will know what that is.
Well it looks like I need to always use "www" in front of my domain. That was my issue. rebelstudent.com/test.aspx doesn't work but www.rebelstudent.com/test.aspx does. Thanks for everyone's help!
More than likely the problem is your render method for your canvas is set to an IFrame (instead of FBML).
Go here: http://www.facebook.com/developers/apps.php
Click on 'Edit Settings'
Select 'Canvas' in the left navigation
Underneath the 'Canvas Settings' heading, select 'FBML' for the 'Render Method'
FB_RequireFeatures(["XFBML"], function() {
FB.Facebook.init("key", "/xd_receiver.htm");
FB.Connect.requireSession();
FB.ensureInit(function() {
FB.Connect.showPermissionDialog("offline_access,read_stream", function(x) { alert(x); window.location = "/myAuthorizeApp"; });
});
});
It doesn't do quite the same thing as you're trying to achieve, but I found I needed to require XFBML to get the the other JS functions to work properly, strange enough.. Also, look into rendering XFBML server side.