Updates to Google Analytics in Blackbaud Sphere

On Thursday June 14, 2012 we released an update to how we implement Google Analytics in Blackbaud Sphere. In older versions of the Google Analytics code snippet, it was suggested that the code be placed before the closing body tag in the page.  Google recommends that newer versions of the code snippet be placed before the closing head tag in the page. As a result we have updated the CMS Administer > Add Ons > Google Analytics field so that it is now inserted before the closing head tag in CMS pages.

What does this mean to you? First, if your organization was adding custom HTML, other than Google Analytics code, to this field it may no longer render correctly. Second, you will want to insure that you are using a newer version of the Google Analytics code. If you are using the traditional Google Analytics code there is a possibility that tracking may be interrupted.

How can you tell what version you are using? It’s fairly easy to tell by looking at the code itself. Newer versions will look something like this:

<script type=”text/javascript”>

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
    ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
Note the presence of “document.createElement” and “document.getElementsByTagName”. You will not see that in the traditional Google Analytics code.
Older versions will have two distinct script tags and will look more like this:
<script type=”text/javascript”>
var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
document.write(unescape(“%3Cscript src=’” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
</script>
<script type=”text/javascript”>
try{
var pageTracker = _gat._getTracker(“UA-xxxxxx-x”);
pageTracker._trackPageview();
} catch(err) {}
</script>

The Blackbaud Sphere product team is committed to continuously improving the Blackbaud Sphere platform. This update allows us to keep pace with Google’s recommendations and utilizes a much more efficient model for implementing their tracking code. Google Analytics can provide a wealth of information about your site visitors, so happy data mining!

You can keep up with us on Twitter by following @bbsupport; we use the hashtag #bbsphere when we discuss Blackbaud Sphere. Take a look at our Twitter Guide for more info




  • http://blog.lwr.org/author/druth/ Dan Ruth

    I’m trying to set up GA conversion tracking for various Sphere donation forms. However, the forms in our website appear with the domain “kintera.com” instead of our org’s domain. Do I need to use Cross-Domain Tracking in Google Analytics to be able to track donations?

  • Allan Benamer

    Hey Dan,