Sorry, the message I saw was obviously on the logout page not as I thought on the index page. I added the code to the logout page and it displayed correctly.
It looks as though I'll have to add the line of code manually to all the site's 46 pages (the detail, results and cart pages already have the line of code so they are ok). Also will the code need to be added manually to any further new pages created.
Is there a quicker way to do this?