Why GTM Preview Mode might not work on your site

I was trying to run a Preview of Google Tag Manager for a site I was working on, but for some reason it simply wasn’t showing. Turning to the Console as always when something unexpected happens (or doesn’t happen), I saw an error message about my ‘Content Security Policy directive’ being violated.

Basically, a CSP is a directive that says what content is allowed on a site. For example, it might say that external scripts aren’t allowed. And in my case, it wasn’t allowing the debug mode of GTM to be delivered from the domain tagmanager.google.com/debug.

To get round this (if you don’t want to change your CSP) use a handy Chrome extension called Disable Content-Security Policy.

E is for Events

Events are user actions or behaviour on your site that you’ve defined as important to you. The only interaction that Analytics tracks by default is a page view, so if you want to track actions like form submissions, video views, downloads etc. you’ll need to implement Event Tracking.

Why? To know exactly what people are doing on your site. We’ve talked about Bounce Rate before, and how if you haven’t defined an event for that home page video play it might seem that engagement is poor when the opposite is true. You want to get to a point where people can’t sneeze on your site without you knowing what device/source/browser led to that sneeze. Event Tracking will help with that.

Event Tracking used to be a case of adding a bit of Javascript to the element you wanted to track, but there’s a far better way to do it: by using Google Tag Manager. While it’s a little work to set up initially, it’ll make your overall life with Analytics far better, and not just because it’s so easy to set up event tracking.

However you set up implement event tracking, you will need to give some thought to how you define your events. First, decide on a Category. For example, you have a number of videos on your site, so the overall event category will be ‘Videos’. Event categories are grouped together in analytics reports, so make the category consistent and you’ll be able to see and compare user interaction with all your videos.

The next required element of an event is the Action. This is literally the action taken – a click to play, stop or pause in the case of a video.

And the optional Label element of an Event just that – a name for the specific item, so ‘home page video’ or ‘annual report pdf’ would be Labels for the particular item you were tracking as an Event.

There are other elements to an Event (you might want to use Value if the event has a set value), but the important thing is that unless you use Event Tracking, you’re missing out on key insights into your site and how people interact with it.

Next: F is for Filters

To get these A-to-Zs in bite-size form, follow me @AnalyticsAtoZ on Twitter. Or sign-up to get notified when a new one is out or when my forthcoming ‘A-to-Z of Google Analytics’ book is published.

Solved: WordPress 5 editor fails to save

I like the new Gutenberg editor in WordPress 5, but the first time I used it, it simply wouldn’t save edits! I kept on getting ‘Updating failed’ message for the body of the edit (although editing SEO elements worked).

After some research, it turned out to be an issue with plugins like WordFence and WP Cerber, which block suspicious activity. To resolve without removing the plugin, go into the Hardening tab of WP Cerber and turn on the option ‘Allow access to the REST Api for logged in users’.

D is for Direct traffic

D is for Direct traffic. While there are other Ds, like Device or Dashboard, I’ve gone with Direct since it’s so often overlooked or misunderstood.

The stock answer to the question ‘what is Direct traffic’ is that it’s simply visits from people who typed your website into a browser, or went to your site from a browser bookmark. Well, possibly, but not necessarily.

Direct Traffic is any traffic that Google can’t categorise. Google determines traffic source from the Referrer value in the headers exchanged between a browser and a website. If the Referrer is a recognized search engine, Analytics classifies the traffic as Organic; if it’s from a known social source it’ll classify it as Social traffic; if the URL has campaign parameters, Google will use the parameters to override the above. Otherwise it’s a referral. But if it’s none of the above (or if there are no headers), it’s Direct. This is the simplified version, but it points to the essential nature of Direct – it’s simply what Analytics hasn’t been able to classify.

There will be times when Direct peaks dramatically – just after a TV or radio ad, or an offline mention of your business that drives website traffic. That’s great, but like any analytics fiend I’d want to dig deeper and look at how that bonus traffic moved through the website, and take lessons away from this free exposure.

My main point about Direct traffic is that you do need to investigate it. What are the top Landing Pages? Is it New or Returning visits? If it is traffic from people who know you, and have bookmarked you, you would expect the traffic to be Returning visits and the Bounce Rate to be lower than average. And quite often they’re not.

Looking at Direct traffic for this hotel, we see substantial, engaged traffic to the reservations page, entirely what we’d expect. But more direct traffic lands on the home page, a lot of it New users, with an above average BR. Red flags are waving!

Make a shift in your thinking about Direct traffic – it’s probably come from many, many more places than bookmarks or typed-in URLs. It could be from a clicked link in Skype, Messenger, or WhatsApp. Could be from a link in a mobile app or a PDF. And traffic from a secure site to a non-SSL site will definitely appear as Direct traffic.

So take charge; aim to reduce unknown Direct traffic. You can start by tagging any links that you do have control over. For example, where possible add utm parameters to links to force the Source and Medium.

Like anything in Analytics, face value doesn’t cut it. Take control when you can, and drill down constantly, so you can better understand the data that’ll move your business forward.

To get these A-to-Zs in bite-size form, follow me @AnalyticsAtoZ on Twitter. Or sign-up to get notified when a new one is out or when my forthcoming ‘A-to-Z of Google Analytics’ book is published.

C is for Conversion

While Channel or Custom Dimension might be valid candidates, C has got to be for Conversions – the lifeblood of any business.

A conversion is a key action that’s valuable to your business, like an email sign-up or enquiry form submission or better still, a purchase. If you’ve set up e-commerce tracking, you’ll be able to see conversion data on sales; otherwise, they’ll be based on an action (goal) you define. And if you don’t have conversions defined, how will you know the effectiveness of your ad campaigns or marketing channel/spend?

Google makes a distinction between micro and macro conversions, micros being an activity which tend to move a visitor to a macro conversion like a sale. But for the small business, micro are macro.

So what do you do with your juicy Conversion data? Segment it. Let it answer questions like ‘which channel led to the most enquiries or sales?’ or ‘Did mobile devices convert at a better rate than desktop?’

Tips: Loose the woolly conversion goals like ‘spends 5 minutes or more on the site’. Big deal, maybe they fell asleep. Focus on the actions that’ll move your business forward.

And check your conversions after a site migration or redesign – it’s easy to forget URL-based conversions can get broken.

If it’s an oversight to have the wrong goals, or even none at all, it is a criminal offense (punishable by a spell in HMP Styal-sheet) to have none showing in your Adwords. If you need help, I’ve written a step-by step guide to connecting Analytics with Adwords.

Finally, if you want to set the office alight with a rousing sound when an analytics goal is fired, check this blog post!

To get these A-to-Zs in bite-size form, follow me @AnalyticsAtoZ on Twitter. Or sign-up to get notified when a new one is out or when my forthcoming ‘A-to-Z of Google Analytics’ book is published.