The google plus badge sometimes it render okay with no errors, sometimes it doesn't render and give this error in the console :
TypeError: a is undefined
...pi.auth,e={client_id:c,session_state:b};a.checkSessionState(e,function(b){var c=.
My code is :
< div class="g-page" data-href="https://plus.google.com/+google" data-theme="dark" data-showtagline="true" data-showcoverphoto="true" data-rel="publisher" >
<!-- Place this tag after the last widget tag. --><script type="text/javascript">
window.___gcfg = {
lang: 'de'
};
// just put this in here
document.getElementsByClassName('g-page')[0].setAttribute('data-width', document.getElementById('google-badge').clientWidth);
(function () {
var po = document.createElement('script');
po.type = 'text/javascript';
po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
</script>
EDIT: the a is defined in the google api here : https://apis.google.com/js/platform.js
ais being defined or what it's supposed to be. - jonmrich