Google+ share counts are not showing - share

I am using Google+ JavaScript API and currently my Google+ share counts are not showing on the website.
Note: I am using Google+ JavaScript API
This is the code I tried
<!-- Place this tag in your head or just before your close body tag. -->
<script src="apis.google.com/js/platform.js" ; async defer></script>
<!-- Place this tag where you want the share button to render. -->
<div class="g-plus" data-action="share" data-annotation="vertical-bubble" data-height="60">
</div>

They have been retired now so the share counts are no longer available.

Google may have done this to speed up the load time of the Google Plus buttons.
https://plus.google.com/110610523830483756510/posts/Z1FfzduveUo

Related

Is GA code needed when I use Google Tag Manager

I am trying to use Google Tag Manager and implement a custom dimension in a website. I use code igniter and need to get how many facebook, twitter and googleplus logins there are. I already inserted the dataLayer in the body above the GTM code but it seems the dataLayer.push isn't sending anything to GA. I am not seeing any pageviews or custom dimensions fired in GA. Is there anything else I need to do?
<body>
<script>
dataLayer = [];
</script>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');</script>
<!-- End Google Tag Manager -->
<script>
dataLayer.push({'socialType': '<?php echo $adapter->id; ?>'});
</script>
Do I need to put the regular GA code or does GTM insert this for me?
From what you already have you also need to do the following:
Make sure that you have created a tag for Google Analytics in your tag manager account for page views, I assume that you have already done this.
Make sure that you have created another tag for Google Analytics, set the Analytics ID and then set the type of tag to Social.

Google DFP ads in email behaving strangely

I am trying out serving DFP ads in email. I'm following the guidelines here.
I have an ad unit set up just for email
I have a line item targeting that ad unit with just an image creative
The line item doesn't have any targeting restrictions or anything like that
The ad will show up in the email, at least the first time. The strange thing that I'm seeing is, after the first click, clicking on the ad again will often bring me to a blank page rather than the click-through page of the creative. Also, when I reopen the message, occasionally the image will not load. The code in the email looks like this:
<a href="https://pubads.g.doubleclick.net/gampad/jump?iu=/{my_pub_id}/300x250_email&sz=300x250&c={cachebuster}&tile=1">
<img src="https://pubads.g.doubleclick.net/gampad/ad?iu=/{my_pub_id}/300x250_email&sz=300x250&c={cachebuster}&tile=1" />
</a>
We've solved this by turning off cookies in the standard tag using the co= option; adding co=1 to the tag.
<a href="https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/{my_pub_id}/300x250_email&sz=300x250&c={cachebuster}&tile=1">
<img src="https://pubads.g.doubleclick.net/gampad/ad?co=1&iu=/{my_pub_id}/300x250_email&sz=300x250&c={cachebuster}&tile=1" />
</a>
The only problem (for us) that this creates is that we're unable to serve 3rd party tags, even ones that resolve directly to .gifs, using the standard tag.
Had the same problem and I solved it by using script to redirect click via script on my web server where ad is shown again so that all the cookies can be set.
Link looks like this:
http://www.mysite.com/dfpclick.php?adunit=mailing&cbuster=1369608725
Script dfpclick.php:
<?php
/* Google DFP url redirect*/
if ($_REQUEST['adunit']) {
$sUrl = 'http://pubads.g.doubleclick.net/gampad/jump?iu=/%mygoogleid%/'.$_REQUEST['adunit'].'&sz=1x1&c='.$_REQUEST['cbuster'];
}
?>
<html>
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=<?=$sUrl?>">
</head>
<body>
<?php
if ($_REQUEST['adunit']) {
echo '<img src="http://pubads.g.doubleclick.net/gampad/ad?iu=/%mygoogleid%/'.$_REQUEST['adunit'].'&sz=1x1&c='.$_REQUEST['cbuster'].'" width="0" height="0" border="0" style="width:0px; height:0px;" alt=""/>';
}
?>
</body>
</html>
It turns out that DFP for small business requires cookie support to work, even when using the non-JavaScript method of calling ads. So it works fine in web-based clients like Gmail, but it doesn't work in Outlook and the like. DFP Premium can supposedly serve ads in email without requiring cookies.
Using the co= option doesn't work for DFP Small Business. My workaround is:
Use the same code for img <img src="https://pubads.g.doubleclick.net/gampad/ad?iu=/{my_pub_id}/300x250_email&sz=300x250&c={cachebuster}" />
And build a redirect link on your website <a href="http://yourwebsite.com/adunit/300x250_email">. This page reads and filters the response from http://pubads.g.doubleclick.net/gampad/adx?iu=/{my_pub_id}/300x250_email&sz=300x250&c={cachebuster} in order to get the click-tracking link using javascript link=$(xmlDoc).find('a').attr('href'); and redirect.
This workaround doesn't work for rotation (more than one creative/line item is competing for the same ad unit at the same time).
I'd like to know how to serve email ads in rotation using DFP SB

AddThis : Cutomization

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.

Is it possible to put an iframe inside a Facebook page tab?

According to the Facebook developer roadmap, it will soon be possible to put iframes inside page tabs but it's not yet available. I came across this Store Locator on Coach page which uses an iframe to display a Google map inside a tab :
http://www.facebook.com/Coach?v=app_168904438199&ref=ts
Looking at the source code, I see the map really is inside an iframe. How is this possible?
in STATIC FBML pages you CAN'T USE IFRAMES - no matter what FBML code you put in there, facebook have specifically made the code not work in in business page/tab static fbml pages - my guess is so they can prevent people setting up Amazon stores or other content that uses IFrame (spammers and spyware often use iframes) - the updates are in their 2010 wiki - so it's probabley also a security thing.
I frames can still be used on developers canvas pages apparently but the customer has to click on an image for it to activate rather than the iframe automatically loading - again this is probably a security issue to prevent driveby downloads - where zwinky and similar toolbars are forced onto people computers in the background via iframes without their knowledge.
However some say it does work although you need a user to click on it before it works. if you can live with that then go for it.
<a onClick="outside_location.setInnerFBML(location_two);" style="cursor: pointer;"><center>→our website</center></a><div id="outside_location"> <fb:iframe width="730" height="400" frameborder="0" src="http://www.fborder.com/" /> </div>
<fb:js-string var="location_two"> <fb:iframe width="730" height="600" frameborder='0' src='http://www.fborder.com/' /> </fb:js-string> <script type="text/javascript" charset="utf-8"> var outside_location = document.getElementById('outside_location'); </script>
check out this post. people have got it to work. and some say it wont work for the obvious reasons. such as security and so on. but give it a go regardless.
http://www.facebook.com/topic.php?uid=4949752878&topic=7081
PK

Facebook IFrame on page canvas?

Hey guys, I have developed a small site that i would like to embed into a tab on a facebook page.
Previously I used this code to load in an iframe, it worked great:
<a onClick="outside_location.setInnerFBML(link_1);" style="cursor: pointer;">Link 1</a> | <a class="red" onClick="outside_location.setInnerFBML(link_2);" style="cursor: pointer;">Link 2</a>
<div id="outside_location"></div>
<fb:js-string var="link_1"><fb:iframe width="760" height="1280" frameborder='0' src='http://www.WebWhispers.in' /></fb:js-string>
<fb:js-string var="link_2"><fb:iframe width="760" height="1280" frameborder='0' src='http://google.com/' /></fb:js-string>
<script type="text/javascript" charset="utf-8">
var outside_location = d
document.getElementById('outside_location');
</script>
However, it has stopped working. I dont think facebook allows iframe inside of pages, only applications.
How can I load this page in without learning FBML? The site uses Jquery so I cant use FBML anyway.
I know applications can use iFrames, can I make it an application and then embed the application into a page tab somehow?
No. Tab pages can not contain iFrames. They must be written using FBML and FBJS.
One reason for this is that Facebook does not want to enable Tab pages to detect who looks at them. All requests (including images) on tab pages are proxied through Facebook for this reason. If iframes were allowed then the application would be able to detect who looked at it, which would present a privacy issue for Facebook users.
This is either a policy change by Facebook or, more likely, a bug. I say it's unlikely to be a policy change as it throws a script error, whereas a policy change would more likely strip the code out before it's rendered.
There's a bug report you can add votes to and follow here.