How to add a Warming Up message to your Umbraco site

When building a website, the optimal thing is that the users experience no downtime while a new version of the site is being deployed. This can however be quite complex to achieve in reality, and usually requires that you have multiple web servers.

The next best thing is that your users at least do not just get a browser showing nothing, while the page takes forever to load. While deploying, you could use the app_offline.htm, but that just blocks all requests, and when you remove it, the site still has not booted up.

In this post we will look at

  • How to configure this
  • What are the potential issues
  • What can we do to solve it

Read More »

Error page setup in Umbraco

Before deploying your Umbraco website to production, you want to make sure you are not displaying the standard YSOD to users in cases of exceptions.

I wanted to make a setup that achieves the following:

  1. Show a nice error page to the user
  2. Show the page on the url where the exception happens
  3. Return the appropriate 500 status code

Read More »

What is gtm_cookies_win in GTM?

If you have started using the “environments” feature in Google Tag Manager (if not, read why you should at Simo Ahava’s blogpost on environments), then maybe you’ve experienced some weird/confusing behaviour when using the preview/debug functions.

You may have also noticed the gtm_cookies_win=x in your tracking snippet.

2016-06-06_1616
Tracking snippet from the “Staging” environment.

After searching for information about the gtm_cookies_win parameter, and not finding anything, I decided to try and debug my way out of it.

Read More »

Out of the box

When planning a new ecommerce website, you most likely have a budget. And of course you want to spend you money wisely, in order to get the most value in terms of design and features that will help you reach your goals.

Typically, when evaluating different platforms, it then makes sense to ask the question: “What do we get ‘out of the box’?”. And that is a perfectly valid concern. Anything that you can get included from the platform vendor logically means that you don’t have to pay your developers to write the same code.

But choosing to use those “out of the box” features might come a a different kind of price, depending on the the layer of the application they exist in. Let’s try and take a look at some examples.Read More »

An open standard for universal one click purchases

Every year at work, we take a few days to try and do something different from our everyday work, and se if we can live up to the name of the even: “Innovation Camp”.

This year I decided to try and take a look at the concept of an open standard for user-centric click-once payments. The idea is that a customer can create his shopping basket as per usual, but when he is done, then he can transfer all his billing, shipping and payment information to the merchant/gateway with one click.Read More »

The hasbang controversy

The other day I responded to a tweet about using prerendering tools to serve JS driven pages to crawlers.

Afterwards a twitter debate followed, and as usual, much is lost in a debate limited to 140 char chunks. Basically the opinion was that if you use hashbang urls, you are the spawn of the devil, and you will kill all the kittens in the world ;).

I will try to present my argument why I think using hasbang urls can be an acceptable solution to a specific problem.Read More »

Shared Google calendars on the Nokia Lumia 1020

I just got my new Lumia 1020 which runs Windows Phone 8, and wanted to set up my Google stuff to sync with the phone. I use two factor auth, and after creating an application specific password, it synced up all my email, and my own calendars.

But my wife’s shared calendar did not show up, and given the history of issues between google and Windows Phone, I started searching for a solution. The Lumia 1020 is no longer using Active Sync, so all the old guides were no longer relevant. By pure luck, I stumbled on a post with this link:

https://www.google.com/calendar/syncselect

That will let you select which calendars should be synced when using CalDAV access, which is what the Lumia 1020 is now using.

You might need to remove/save/add the checkbox for syncing calendars for your google account on your phone before it shows up, but I now have the shared calendar in there as well.

I hope this might help out others struggling with this.

Natur-Energi bruger ufine metoder

Jeg vil gerne lige gøre mit til at advare mod selskabet Natur-Energi der tilsyneladende ikke har meget respekt for forbrugernes rettigheder. Flere andre har også have uheldige oplevelser med dem, som f.eks. Tonni, der blev svindlet med nog bil streamer værk: http://ekstrabladet.dk/kup/vagthundene/article1195722.ece og John der åbenbart skulle skifte selskab fordi han var med i en spørgeskemaundersøgelse:http://24.dk/user/johnsmedehus/perma/2009/07/19/det_er_da_halvfarligt_at_deltage_i_sprgeskemaer_p_netet

Og Mogens har her på facebook beskrevet noget der meget godt ligner den situation vi også er i:http://www.facebook.com/wall.php?id=59887513919

Humlen i det hele er at Natur-Energi synes det er helt OK at de hijacker dit el-abonnement uden at fortælle det til dig. Det eneste du skal gøre er bare lige at gøre dit og dat for at vise at du “støtter grøn energi”, og hvem gør ikke det? Det glemmer bare helt at fortælle at de selv er et el-selskab der har tænkt sig at overtage leverancen af strøm til dig. Og vupti, så får du en faktura. Hvis du prøver at ringe til dem, ja så får du lov at vente i 10 minutter til noget musik før linjen bare bliver tavs. Fedt…Read More »

Tracking all outgoing links with Google Analytics

I wanted to try and find a way to track all of the outgoing links on my blog, without haven to modify the html of the link. What I found was that using javascript listeners would probably be the best solution. Actually this technique can be used for a lot of stuff, but this is what I did:

// Cross-browser implementation of element.addEventListener()
function addListener(element, type, expression, bubbling) {
    bubbling = bubbling || false;

    if (window.addEventListener) { // Standard
        element.addEventListener(type, expression, bubbling);
        return true;
    } else if (window.attachEvent) { // IE
        element.attachEvent('on' + type, expression);
        return true;
    } else return false;
}

//This is what i want to do whenever someone clicks on the page
function itHappened(evt) {

    //Get the clicket element
    var tg = (window.event) ? evt.srcElement : evt.target;
    //If it is an A element
    if (tg.nodeName == 'A') {
        //And it is not an internal link
        if (tg.href.indexOf(location.host) == -1) {
            //Replace all odd characters, so that it works with Analytics Niavgation analysis
            var url = tg.href.replace(/[^a-z|A-Z]/g, "_");

            var txt = tg.innerHTML.replace(/[^a-z|A-Z]/g, "_");
            var str = '/outgoinglink/-' + txt + '-' + url;
            try {
                //Track it
                urchinTracker(str);
            }
            catch (err) {
                //alert('error: ' + err);
            }
        }
    }
}
//Add the click listener to the document
addListener(document, 'click', itHappened);

I hope you can use it. Any comments or advice is very welcome 🙂