July 2013 - Digital Tool Factory blog July 2013 - Digital Tool Factory blog

The Digital Tool Factory Blog

How to fix problems in adding ssl certs on Windows Azure Websites

For some reason, most likely because you never do it more than once a year, adding ssl certificates to a server is poorly documented and unnecessarily complicated.  Here are some things I learned recently about adding ssl certs on Windows Azure Websites.

I recently added a cert to this site, https://digitaltoolfactory.net which is hosted on Windows Azure Websites.  It looks simple enough, just upload a file, sure it’s a .pfx file, but those are avilable aren’t they?

Off I go to NameCheap.com, plunk down my $10 and get a GeoTrust Rapid SSL Certificate.  Then you have to generate a CSR – from there just go to your IIS manager and

  1. Click on “Create Certificate Request” (Common Name is the domain name btw)
  2. Do Everything it asks
  3. You will then plug that into your SSL Provider, they will then email (of all things) you back a long code
  4. Go Back to your IIS Manager and click on “Complete Certificate Request”
  5. You will then have a file – this is not the file you use
  6. From there click on the server certificate, and then click “Export”
  7. That will generate the .pfx file
  8. From there you can upload the file to Azure
  9. You then have assign the bindings to that certificate
  10. Restart the site in the Azure Manager

That’s it!

There are a few caveats.

The big one is that if you have any errors in this process Azure will not tell you – instead all you will get is the big scary “This site claims to be DigitalToolFactory.net, but the actual certificate is for *.WindowsAzureWebsites.net”.

The other caveat is that Microsoft is charging $9.00 per month to host a site site with Secure Socket Layer bindings, which is ridiculous.   By my estimation it costs more to host the cert than to host the actual site, which makes it unique in all web hosting.  Why they do this I don’t know.  I’m glad to have the option, but the amount seems ridiculous – hopefully that fee will drop soon.


26
Jul 13


Written By Steve French

 

How to track outbound links in the new version of Google Analytics

So the Gods of Google have gone and changed their basic Google Analytics code to something that works slightly better, and now your outbound link tracking code doesn’t work.

Here is how you fix that – first make sure you have the most recent (as of July 2013 Google Analytics code, it looks something like this)

<script>
(function (i, s, o, g, r, a, m) {
i[‘GoogleAnalyticsObject’] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, ‘script’, ‘//www.google-analytics.com/analytics.js’, ‘ga’);

ga(‘create’, ‘UA-XXXXXXXX-1’, ‘mydomain.com’);
ga(‘send’, ‘pageview’);

var clientId = ”;
ga(function (tracker) {
clientId = tracker.get(‘clientId’);
});
</script>

 

If it does not look more or less like that, then do not use the code below.

Now make the links you want to track look  like this

<a href=”http://www.SomeOtherDomain.com” onClick=”ga(‘send’, ‘event’, ‘Outbound Links’, ‘click’, ‘http://www.SomeOtherDomain.com’)” target=”_blank”>www.SomeOtherDomain.com</a>

Note the onclick event – that is the key thing.

 

Where can you see the result?  They do not show up as page views  (like they used to) instead they are treated as “Events”.  To see them, go to (in the main Google Analytics screen)

1.  Standard View

2. Content

3.Events

4. OverView

5. Event Label

And there you are.  Not exactly intuitive, but not bad.

 


08
Jul 13


Written By Steve French

 




Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.