How to link Webmaster Tools with Google Analytics

You can link Webmaster Tools with Google Analytics? Why yes you can! In doing so, it allows you to integrate all the services of each into one big tool to measure the behavior of your site’s traffic. This allows you to dig deeper into how people are searching your website so you can see what…

The post How to link Webmaster Tools with Google Analytics appeared first on Diamond Website Conversion.

how-to-link-webmaster-tools-with-google-analytics-200x200You can link Webmaster Tools with Google Analytics? Why yes you can! In doing so, it allows you to integrate all the services of each into one big tool to measure the behavior of your site’s traffic. This allows you to dig deeper into how people are searching your website so you can see what they are looking for the most. Aside from their capabilities, the great thing about having both of these tools are that they are absolutely free. The only thing you need to do in order to take advantage of them, are to sync them together.

This article will show you how to link Webmaster Tools with Google Analytics.

How to link Webmaster Tools with Google Analtyics

Before you can link Webmaster Tools with Google Analytics, you need to sign up for a Google account. After you have a Google account, you need to sign up for Google Webmaster Tools and Google Analytics. You will need to submit your website to each of them and add their tracking code onto your website.

The best tool to add the tracking code from Google Analytics or get your site crawled by Google Webmaster Tools, especially for WordPress users, is to use Google Analytics for WordPress, and WordPress SEO by Yoast, both of which are handy plugins.

After you’ve installed the tracking codes, either manually, or using the recommended plugins if you’re a WordPress user, then you need to link Webmaster Tools with Google Analytics.

Step 1. You can link Webmaster Tools with Google Analytics by going to the Google Analytics tab called Admin. After you’ve clicked to go to the Admin section, there are 3 columns. Look for the middle column that says Property. You want to click on the link that says All Properties. (Note: Right click on the image below to open in a new tab or window in order to see how you can navigate to where you need to link Webmaster Tools with Google Analytics.)

link-webmaster-tools-to-google-analytics

Step 2. On the All Properties page, if you scroll, you’ll see all sorts of Google properties listed. You will want to find the Google Webmaster Tools section.

webmaster-tools-all-property-page-in-google-analytics

Step 3. Fill out the form and hit save. On this page you’ll want to also decide if you want to enable features like Demographics and Interest Reports Advertiser Features, and In-Page Analytics.

The Demographics and Interest reports basically collect information on your visitors in regards to age, gender, and their interest. The Advertiser Features give you options not available in regular use of Google Analytics and give you the ability to remarket with the platform, as well as have DoubleClick integration, reporting on Demographics and Interests, and reports on Google Display Network Impression.

As a note, while in this step, please make sure that you’ve hooked your website up to Google Webmaster Tools. The website has to be verified or this will not work right. Click save when you’re done.

webmaster-tools-link-to-google-analytics

The process in how to link Webmaster Tools with Google Analytics doesn’t take long at all. If you’ve already hooked your website up with each Google property, then it’s pretty easy to do.

Have you linked your Webmaster Tools with Google Analytics?

The post How to link Webmaster Tools with Google Analytics appeared first on Diamond Website Conversion.

12 Blog Mistakes Killing Your Leads and Email List Growth (and how to fix ’em)

Helping create or market a blog for your business? I’m sure you realize that having one is essential for getting much higher rankings and traffic from Google. But how well are you converting your great…

blog mistakes

Helping create or market a blog for your business? I’m sure you realize that having one is essential for getting much higher rankings and traffic from Google.

But how well are you converting your great blog traffic into something of high value – huge amounts of leads to follow-up with or to quickly building your email list?

Unfortunately, many blogs do a poor job of converting a good percentage their visitors – I’ve seen it after reviewing hundreds of blogs over the last 5 years (like the Backlinko.com blog before I helped optimize it).

To help you grow your email list and leads much quicker, here are the 12 biggest, most common blog mistakes, and how to fix and optimize them.  How many of them is your blog making? Let’s get started…

The 12 Most Common Blog Conversion Mistakes to Avoid

1. Showing annoying ads. Nothing kills a good blog user experience quite like showing annoying ads in your side bar, or worst still, in your actual blog article – particularly animated ones. Sure, they might make you a few bucks, but they cheapen the look of your blog, and worst still, distract and tempt your visitors to click away from your great content.

So unless your websites main goal is to generate ad revenue, you really should remove all your ads – this will often reduce bounce rates and focus your site better on your major goals.  Check out how many ads are on this blog below, particularly at the top – not exactly a great visitor experience, right?

ad in article

Don’t believe me or not sure what ads to remove? Test it – using an A/B testing tool try removing your most annoying or prominent ads for a week and see the impact on bounce rate and converting more visitors into subscribers or leads. You will be pleasantly surprised…

2. No value proposition clearly mentioned. So many blog creators expect visitors to know what their blog is about and the benefits of it, but neglect to actually clearly mention it. Why make your visitor have to work to understand? This is particularly problematic when visitors will often judge a website within just 10 seconds, and is a major cause of high-bounce rates on blog articles.

To make it easier for them to understand the benefits of your blog and increase the chances of them sticking around, add a few essential things to it – firstly add a tagline under your logo that helps visitors understand what the blog is all about. Secondly, add a small module towards the top of your side bar showing key benefits of your blog. You can see good examples of this on my blog, and on the Rebootedbody.com blog:

blog value prop

3. Dead-end articles with no good call-to-action. The end of articles is one of the most critical places on blogs – this is where your visitor’s eye flow ends up after reading your article. Unfortunately, many blogs don’t take full advantage of this space, and simply put related links at the end of their article – hoping that something will be of interest to their visitors. But this often just delays them inevitably leaving without subscribing or converting.

To capture hundreds more emails and boost your list growth, you need to use this space to show your visitors something of value for free (known as a lead magnet). This can be something like a related free ebook, a free trial to what you sell, or a free consultation. Make sure it stands out too, and include some imagery, otherwise your visitors won’t really notice it. Testing this is key for maximizing opt-ins, particularly the wording and call-to-action. See below for a good example of this on the Sparkline.com blog:

blog lead magnet

4: A non-mobile optimized blog. The percentage of visitors arriving on blogs via their mobile phone is growing at a crazy rate (it’s now over 20% on my blog) – and unfortunately many blogs don’t make it easy for these visitors to read their content. This is because reading blog articles is hard on small screens – unless you have a mobile optimized blog, visitors have to zoom and scroll to read your content. They will often get annoyed by this and leave your blog to find a related one that is mobile optimized.

To fix this, the best solution is to have a responsive website design that changes font sizes, images, layout and widths dynamically depending on the size of the visitors screen – this ensures your blog reads and looks great on any mobile device, including tablets. For a cheaper quicker option, consider using a tool that automatically mobile optimizes your blog like WP Touch. Below you can see a few fantastic examples of responsive blogs – the IWillTeachYoutoBeRich.com blog and the SmartPassiveIncome.com blog.

responsive blogs

5. Short articles with no images or subheaders. This is a real visitor engagement killer – arriving at a blog that has no images and has just several long blocks of text. Unfortunately its still much too common, particularly for corporate website blogs. These types of articles make your visitors leave even quicker – probably unlikely to return.

To make sure your blog isn’t guilty of this, always try to write more in-depth content with images and subheaders – this not only makes your content seem much more appealing, but also makes it much more ‘scanable’. This will reduce your blog article bounce rates and increase the chances of your visitors finding your content valuable and subscribing/converting. As a bonus, longer content often results in higher rankings in Google.

6: A cluttered side bar. Now this happens all the time – bloggers just making their side bar a dumping ground for all kinds of promos, ads and widgets and hoping visitors will like at least one thing. Often continually adding new promos, without removing older ones. But in reality, the more content you have in your side bar, the greater chance your visitors won’t see any of your really good content there. And worst still, having ads there cause ‘banner blindness’ so your visitors will often just ignore the whole side bar.

To fix this, remove less useful content from your side bar – for example, in addition to ads, blog categories are not really that helpful and take up a lot of room, as do latest Tweets or Facebook widgets. Instead focus it on promos for your most useful content and value proposition. If you aren’t sure what to remove, really think what is most useful, and test removing different content using an A/B testing tool and check then impact on conversions and bounce rate.

Free Bonus Blog Conversion Optimization Checklist!
Maximize your leads or email list by downloading this free content upgrade – my 20-point blog conversion optimization checklist. Grab my blog optimization checklist (PDF)

7: Few signs of social proof. Unfortunately many blogs look like a ghost-town with little signs of good social proof, even ones with good traffic – with few comments or shares, no mentions of popularity or how many subscribers or followers they have. Just like people prefer restaurants with good reviews and many diners in it, blog visitors are much more likely to think positively and subscribe to blog content that they know other people love and often use.

There are many ways to increase social proof on your blog. First, if you have a good amount of readers or followers (ideally over 1,000), then clearly state that in your side bar. Second, if you have great reviews, place a testimonial there too. Showing well-known media mentions will also help boost social proof – like you can see on the SmartBusinessRevolution.com blog:

review and media mentions

Don’t forget to also add social media icons that include share numbers (but to avoid negative social proof, only show numbers when they are higher than 20) – add this at the end of your articles, or make them sticky to the left side. This is a simple way to increase signs of popular and social proof.

8: Bland, non-engaging article headlines. It doesn’t matter how good your blog articles are if your headlines are dull and not captivating – few visitors will stick around to read it, let alone convert into a subscriber or a lead. Sadly, many blogs make this mistake and are in need of some good copy-writing love. Many blogs also use small headline fonts, which makes them even less attention-grabbing.

To fix this, always use compelling copy-writing principles for your article headlines and make them stand out. Using steps or numbers, asking questions and mentioning common visitor pain points are some good ways to make your headlines more engaging – here is a great guide for creating captivating blog headlines. You should also check out this great headline testing tool to find highest-clicked variations of your headlines.

9: No good incentive for visitors to subscribe. So many blogs just mention ‘subscribe to our blog’ or ‘get updates’ in their side bar and hope thats good enough to convince visitors to do so. Bad news folks – if you do that, you won’t be getting many subscribers – it’s not very compelling or even eye-catching, and offers little value proposition to your visitors. When was the last time you actually subscribed to a blog that way? Your visitors rarely will either.

To increase subscribers and build your email list quicker, give your subscriber box an upgrade – create a compelling free incentive to subscribe and mention it in your sidebar with visuals to help draw your visitor’s eye. For example, create a free short mini-course or a giveaway a short ebook relating to your blog. Again, A/B testing is key here to ensure highest conversion rates. Here is a great example of an ‘upgraded’ subscribe in the side bar on BloggingWizard.com (with excellent enticing copy):

better blog subscribe

You could also try using a ‘content upgrade’ call-to-action in your article, like I use to giveaway my conversion rate optimization blog checklist earlier and at the end of this article.

10: Outdated or ugly blog design. Visitors will judge your blog very quickly – particularly by how good it looks. A well-styled modern blog can really help engage your visitors and increase the chances of them subscribing/converting. If your blog looks like it was created with a free theme with little customization, your visitors will probably notice and not be impressed. Same applies if it looks outdated.

To fix this, consider a style face lift for your blog, and make sure its using latest popular widgets like a good comment system and social share options. To get some great inspiration use a service like 99designs.com to get designers to come up with a new modern look. Ultimately, it’s key to make sure your blog looks better than your competitor’s blogs, otherwise visitors will often prefer going there instead.

11: No use of exit popups to capture emails. One of the newest most effective ways to capture emails on your blog is to use a well-designed popup offering a free incentive, just before your visitors go to leave. This is known as an exit-intent popup. Interestingly, many blog owners think that popups increase bounce rates and annoy visitors – but studies have shown if used well using exit-intent, they don’t impact it negatively. And when I used the exit-intent popup functionality in Opt-in Monster to promote my free toolbox, I increased my email capture rate to 42%. Pretty impressive right?

There are plenty of options for creating customizable exit-intent popups – you can use SumoMe, Opt-in Monster or Popup Domination to name but a few. Remember to optimize what you are offering in your popup – don’t just just say subscribe, give them a great incentive like mentioned earlier. And test the wording, imagery and call-to-action button too! Make sure they can easily close it aswell. Here is a great example of a good eye catching popup on the MarieForleo.com blog:

exit popup

12: No ‘start here’ page to help guide visitors. You have probably created some great articles on your blog – but unfortunately on many blogs it’s hard for visitors to know and find the best content. Most blog readers will only read your article they arrived on – and rarely take time to go through your old content to find other great articles – that may convert visitors better into a lead or subscriber.

To increase the chances of visitors finding your best content and converting, create a ‘start here’ page and put a link to it in your main navigation menu (like on my blog). On this page include links to your most useful and popular content. Here you should also explain more about you, and why you created the blog – a good engaging story will really help! You can see a best-practice example of a ‘start here’ page on the popular EntrepreneurOnFire.com blog:

blog start here

Wrapping up

To grow your email list and leads, it’s essential you give your blog some conversion rate optimization love mentioned in this article – in particular do some A/B testing on key elements like your headlines, call-to-actions and what you show in your side bar. Which of these techniques discussed are you using, or planning on using on your blog?

Content upgrade: grab my free blog conversion optimization checklist!
Quickly boost your blog leads or email list by grabbing my bonus free blog conversion optimization checklist. Download my blog conversion checklist (PDF)

And if you are looking for some personal help, I can quickly help optimize your blog to increase leads and grow your email list. I’m actually just about to help SEMrush.com with my conversion review service. Thanks!

Why Your Website Redesign Will Fail to Lift Sales Much (And What To Do Instead)

Planning on a website redesign soon? Hoping it will finally get the sales or leads you’ve been hoping for? I’ve got some disappointing news for you. Unfortunately, most website redesigns don’t work as well as…

website redesign 2

Planning on a website redesign soon? Hoping it will finally get the sales or leads you’ve been hoping for?

I’ve got some disappointing news for you. Unfortunately, most website redesigns don’t work as well as planned and have barely any impact on sales or leads, and some even have negative effects.

In fact, a recent HubSpot.com study found 68% of marketers did a site redesign in the last 12 months – but 1/3 were unhappy with the results.

And you really don’t want to waste an average of $55,000 dollars on a failed website redesign do you? (as the same study also determined the average redesign cost to be).

So how can you ensure much better results from your next website redesign?

I have created this article to show you the most common reasons why website redesigns fail, and what to do instead to ensure greatest success for improving sales or leads. So let’s get started!

Why your new site redesign will fail to lift sales or leads much

Regardless of the potential lost traffic impact from effect on search engine optimization (which can often be a nightmare when redesigning a website), the are many other reasons why your proposed redesign will fail to increase sales or leads very much.

1: The major reason is that too much is changed at once. Some of your redesign changes will be positive, but unfortunately some will be negative. So the impact of the better changes will be outweighed by your poor changes. And without A/B testing, you won’t know easily the exact things that caused a positive or negative impact on sales or leads generated. For example, your  new signup flow might be much better, but your new homepage headline or call-to-action button might not be converting as well as before.

website redesign conversion impact

2: Too little feedback gathered from visitors. This is one of the major reasons for redesign failure. Your most influential and important audience are your visitors, and if you haven’t got considerable feedback from them on your existing website and proposed design mockups, this will alienate and frustrate many of them when you launch. This is what happened with a recent poor redesign of MarksAndSpencer.com – while the website looked fantastic, it was too modern and many visitors didn’t understand how to use it properly, causing an 8% drop in online sales.

Ideally you need to spend several weeks getting in-depth feedback from your visitors and usability sessions (UserTesting.com is excellent for this), and then involve them at every stage of the redesign process. A key part of this determining the most important visitor tasks and making sure your proposed redesign can easily solve those main visitor needs.

3: Poor use of web analytics to gain insights, reliant on best guess. Many redesigns aren’t powered by insights from web analytics, and instead are often reliant on hoping that ideas will be successful based on best guesses or demands from HiPPOs (highest paid person’s opinion). Without web analytics insights, marketers are essentially blinded by not knowing what pages or elements are performing badly, or their current website performance.

To prevent this, ensure you do a complete analysis of your current website performance, including overall website conversion rate (amount of sales or leads divided by visitors, times by 100), shopping cart (or sign-up flow) abandonment rate, and then bounce rates and conversion rates for your key pages. This benchmark is essential for determining the success of any content you are launching or redesigning, and for future post-redesign launch improvements.

4: Website designers aren’t experts in conversion.  Website and UX designers are visual experts can create great looking websites, with gorgeous color schemes and sizzling imagery. But unfortunately very few of them also know how to design a website that ensures highest conversion rates (and why should they? its very hard for them to be trained and experts in web analytics, marketing and conversion rate optimization best practices).

While its really important to get a good designer to create a compelling and stylish website, you really need to also involve some conversion rate optimization experts – either internally if you are lucky enough to have them, or from experts in the industry (look no further than experts like myself, Brian Massey, Peep Laja, Chris Goward, Bryan Eisenberg and Tim Ash).

5: Redesign processes often take much too long. Many website redesign projects don’t launch on time or never even get finished – the same report from HubSpot.com found that this was the case with 49% of website redesigns. And many take so long that by the time they are launched, it quickly will get out of date again. Using an incremental approach to evolve and improve your website over time is much better (as we will discuss shortly) – and remember your website is never truly finished!

6: Too many chefs in the redesign kitchen. Its really frustrating being in many redesign meetings, with too many people thinking they know what’s best for the redesign. Marketers often clash with designers, who often both clash with senior management (the HiPPOs), with often little being resolved/decided. Ultimately though, its only your visitors who know what will best convert them into sales or leads! That’s why it’s vital to involve them as early and often as possible.

7:  You won’t be able to easily roll back to your old site if the new one performs badly. Sometimes website redesign will work so poorly, that sales or leads will actually DECREASE, even with the same amount of traffic. You may be tempted to quickly flip the switch and restore your old version – but this often much harder to do that it seems. And it will also confuse your visitors, making your business look a bit foolish. An incremental, A/B testing approach will make this much easier to manage and roll-back poor performing new pages or features.

Free Bonus Redesign Conversion Checklist!
Ensure your next website redesign maximizes your sales or leads by downloading this free bonus redesign conversion checklist. Download my redesign checklist (PDF)

Go for incremental, CRO-based website improvements instead!

So those are the main reasons why your new website redesign won’t work that well. But what’s the solution? I have alluded to it above, but essentially you need to use an incremental, CRO (conversion rate optimization) based website improvements instead of full website redesigns. Here are the main components of this, and why it works so well:

  • Instead of launching major website redesigns once every 2-3 years, go for more frequent but smaller highly-performing changes instead (2-5 changes per month). This allows for continual website improvement, rather than hedging your bets on the success of a full major redesign.
  • For these smaller incremental changes, using A/B testing is essential to find out which versions of your proposed redesign convert more of your visitors into sales or leads. Avoid launching a new page or feature on your website without A/B testing it first to find the best variation. You can then use the learnings from your test results and apply them to future improvement tests. And if you don’t have enough traffic, read this low traffic guide for improving websites.
  • By using your web analytics tool, figure out which pages/elements of your website need optimizing or redesigning first – rather than just trying to improve everything at once. For example, your product pages may already be converting well, but your homepage or your navigation menu may not be. Checking the bounce rates and conversion rates for your top entry pages is one of the best ways to find the highest potential pages to improve.
  • Use visual analysis tools to help understand which pages elements need optimizing first. To gain these important visual insights you should use a tool like Hotjar.com to run visitor clickmaps and visitor recording sessions on your key pages. Doing this will help you discover and form A/B test ideas for elements that are most/least engaging to your visitors. For example, you may find that one of your most important CTA buttons isn’t being clicked much, or a particular field on your sign-up form is confusing visitors.
  • Involve your website visitors and target audience feedback early on and continually while making these smaller improvements. For every proposed change you want to make, get visitor feedback from a service like UserTesting.com or UserTest.io, or run your own usability studies. Make sure they can easily complete common tasks and your major use visitor taskes for all proposed new webpage changes, and ask for feedback on what needs improving or seems confusing.
  • Running surveys are highly recommended to get feedback too, including onsite surveys and customer surveys by email. Single question surveys work very well for gathering page specific feedback on key pages (e.g. using Hotjar.com), and is one of the quickest feedback wins to take advantage of. For example, asking a pricing related question on a pricing page.
  • Get some other great insights for the small incremental changes by frequently checking what your competitor websites have recently launched. Not just design-wise, but also new content, and promotions and they have added, and how their overall unique value proposition. Don’t just copy though and presume they know what they are doing – they often won’t – always try to improve on their ideas and what they are doing.
  • Always try to get some feedback on proposed changes from CRO experts like myself. This is because while it’s essential to get your website visitor’s feedback, unfortunately they often don’t know best or which versions of web pages would convert them more often.  This also works well because it provides fresh outside perspective on the current website experience.

Also, don’t forget about the potential big negative impact of search engine ranking changes for your redesign too (a whole other discussion) and this is a great guide on SEO redesign considerations. You obviously want to ensure that you keep your same traffic SEO traffic levels, as well as increase conversions!

Download my free redesign conversion checklist to maximize success!
Ensure your next website redesign maximizes your sales or leads by downloading this free bonus redesign conversion checklist. Download my redesign checklist (PDF)

Now over to you… which of these techniques will you try first?

Do you have a website resign coming up? Which of these techniques are you interested in trying? What challenges are you facing? Perhaps you have already had some success? Please comment below.

How Important are Pageviews for Bloggers?

If you’re a new blogger or have been around the block some, pageviews are really important. If you’re not paying attention to your website’s stats, then you’re missing out on a lot of things that could make you money. Money or any return on investment is important for a lot of bloggers, whether the blogger…

The post How Important are Pageviews for Bloggers? appeared first on Diamond Website Conversion.

how-important-are-pageviews-for-bloggers-200x200If you’re a new blogger or have been around the block some, pageviews are really important. If you’re not paying attention to your website’s stats, then you’re missing out on a lot of things that could make you money. Money or any return on investment is important for a lot of bloggers, whether the blogger is a professional or writing on a website as a hobby. In this article, we’ll cover how important are pageviews for bloggers.

How Important are Pageviews for Bloggers?

What is a Pageview?

In many web analytics platforms, pageviews is a statistic that is commonly measured. Simply, a pageview is how many times a page has been seen. Yes, it’s really that simple of a definition. There are some technical ones, and Google has one specifically defined for those that use the Google Analytics tracking code.

Pageviews as defined by Google Anayltics:

A pageview is defined as a view of a page on your site that is being tracked by the Analytics tracking code. If a user clicks reload after reaching the page, this is counted as an additional pageview. If a user navigates to a different page and then returns to the original page, a second pageview is recorded as well.

A Pageview is Just Another Number, Right?

It’s a number, but not just any number. Pageviews are a very important number to bloggers because it’s one of the statistics that bloggers need to give to potential advertisers that are interested in placing ads on their site. Advertisers aren’t going to pay you to put up an text link, banner ad, or sponsored post without knowing your website’s stats.

A lot of times, the more pageviews you have, the more you can ask of an advertiser. Usually the stat they want is your monthly count, however, a lot of web analytics systems can be broken down into daily and weekly amounts.

As a note, aside from the pageviews, knowing what the majority of the audience is (gender, age range, and location), and keywords are also important numbers to pass to advertisers. For every pageview you get, web analytics platforms like Google Analytics tracks these details for you! 🙂

Pageviews versus Unique Pageviews – What is that?

Other than making money, it also allows you to see the progress of your own website. In fact, aside from pageviews, you also get a number for unique pageviews too! Unique pageviews are when the page has been visited once by a user. For example, if you visit a website and go through 6 pages after visiting the home page, and then return back to the home page when done, that is 7 pageviews, and only 6 of them are unique.

In fact, in Google Analytics, this is measured as a stat, and this is a good indicator of figuring out why your users left your site when you know where they exited the site.

So, really, how important are pageviews for bloggers? If you’re looking at your stats for pageviews for the first time, then you’re looking at a lot of potential for the future.

Do you know your pageview stats? If so, are you using your pageview stats to your advantage?

The post How Important are Pageviews for Bloggers? appeared first on Diamond Website Conversion.

My Google Tag Manager Tag Library

In programming, compiled collections of code that add functionality are typically called ‘Libraries’. They’re often offered up for free to the community to use, build upon, and improve. I’d like to do the same for the web analytics world; so I’ve colle…

In programming, compiled collections of code that add functionality are typically called 'Libraries'. They're often offered up for free to the community to use, build upon, and improve. I'd like to do the same for the web analytics world; so I've collected a few of my favorite Google Tag Manager tags here.

I've tried to pick tags that are great functional additions to any Google Tag Manager configuration. I'd also like for you to contribute your favorites (or offer suggestions on where I can improve mine); I'll periodically add them to the list, or I might even make a follow-up post collecting your suggestions. To contribute, hit me up on Twitter at @notdanwilkerson or email me at notdanwilkerson@gmail.com.

1. Store Cookie

A straightforward tag; this takes values you pass into the Data Layer and creates a cookie on the users browser with them. I've configured mine to fire when {{event}} equals 'setCookie'.

<script>
  var cookieName    = {{cookieName}};
  var cookieValue   = encodeURI({{cookieValue}});
  var cookieExpires = parseInt({{cookieExpires}}) ? new Date(new Date().getTime() + 1000 * 60 * 60 * 24 * {{cookieExpires}}) : 0;
  var cookieDomain  = {{cookieDomain}};
  var cookiePath    = {{cookiePath}};

  document.cookie   = cookieName + '=' + cookieValue + '; Expires=' + cookieExpires + '; Domain=' + cookieDomain + '; Path=' + cookiePath;
</script>

You'll need to configure Data Layer macros for each of the macros above, like below:
Example dataLayer macro that captures the value of the dataLayer variable 'cookieExpires'

I like to set default values for each; here's how I might configure mine for this website:

cookieName: __dfc // Default Cookie Name
cookieValue: 1 // Can evaluate to True
cookieExpires: 0 // Makes the cookie a session cookie
cookieDomain: danwilkerson.com
cookiePath: /

Now, storing something in a cookie will be as easy as pushing some data into the Data Layer.

<script>
var dataLayer = dataLayer || [];
dataLayer.push({
  'event': 'setCookie',
  'cookieName': '__nomnom',
  'cookieValue: 'yum',
  'cookieExpires: 365,
  'cookieDomain': '.danwilkerson.com',
  'cookiePath': '/articles/'
});
</script>

Then you can create a first party cookie macro to access this cookies value.

Example first party cookie macro that gets the value of our example cookie, __nomnom

2. Fire A Google Analytics Event

This has been a huge time saver for me; I mentioned it in my first post about tracking errors using Google Analytics. The format is pretty similar to the above; we're just using the built-in Google Analytics Event tag, in this case.
Screenshot of example Event tag, with each event input filled in with corresponding Data Layer values I use the firing rule {{event}} equals 'eventFired' to trigger this tag. This makes sending events to Google Analytics simple; just push something like this into the Data Layer:

<script>
  dataLayer.push({
    'event': 'eventFired',
    'eventCategory': 'My Event',
    'eventAction': 'My Event Action',
    'eventLabel': 'My Event Label',
    'eventValue': 15,
    'eventNonInteraction': true
  });
</script>

3. Optionally Fire Custom Dimensions And Metrics With Events

Something I've been experimenting with recently has been to add Custom Dimension and Metric macros to my generic events so that I can add that data in if need be. I do this by adding the following values to the Custom Dimensions and Custom Metrics:

An example of using macros for custom dimensions and metrics to allow for piggybacking with normal events

This makes adding custom data to an event as simple as adding 'customDimIndexA': 1, 'customDimValueA': 'Data'. I use letters rather than numbers to prevent mixing up dimension keys with the keys being used for the event.

One example of how to use this would be to capture and store user milestones, grouped by the week milestone achievement (using the {{Week Of The Year}} macro from my last post).

<script>
  var dataLayer = dataLayer || [];
  dataLayer.push({
    'event': 'eventFired',
    'eventCategory': 'Customer Milestone',
    'eventAction': 'Submitted Lead Form',
    'eventLabel': weekAndYear,
    'eventValue': 100,
    'eventNonInteraction': true,
    'customDimIndexA': 1,
    'customDimValueA': {{Week Of The Year}}-{{Year}}
  });
</script>

One Small Problem Feature

I've discovered that Tag Manager will reference the most recent value for a Data Layer variable, even with a default value set, so if you leave a field blank and you've pushed another event with a set value for that variable, you'll wind up copying it's value instead of leaving the field blank. E.g.:

<script>
/**
 * Event looks like:
 * Category: Page Load
 * Action: DOM Ready
 * Label: /this-page
 * Value: 100
 * Non-Interaction: True
 * Custom Dimension 1: 4.38 Seconds
**/
  var dataLayer = dataLayer || [];
  dataLayer.push({
    'event': 'eventFiredWithCustomData',
    'eventCategory': 'Page Load',
    'eventAction': 'DOM Ready',
    'eventLabel': {{page path}},
    'eventValue': 100,
    'eventNonInteraction': true,
    'customDimIndexA': 1,
    'customDimValueA': {{Page Load Time}}
  });
</script>
// Later ...
<script>
/**
 * Event looks like:
 * Category: Customer Milestone
 * Action: Submitted Lead Form
 * Label: /this-page
 * Value: 100
 * Non-Interaction: True
 * Custom Dimension 1: 4.38 Seconds
**/
  var dataLayer = dataLayer || [];
  dataLayer.push({
    'event': 'eventFiredWithCustomData',
    'eventCategory': 'Customer Milestone',
    'eventAction': 'Submitted Lead Form'
  });
</script>

This means you have to fill out every one of the values for this tag each time you fire it, even if they're simply '0' or ''. I'm curious if anyone else has had this problem, and what solutions they've used to tackle it. I'd like to write a post at some point on how best to deal with this.

Update: The very helpful Simo Ahava let me know this was both intended and useful behavior. He also wrote a very detailed post on how Tag Manager and the Data Layer interact. In order to avoid duplicate values for tags that fire twice, be sure to fill out every value in the object you push into the Data Layer.

4. Fire Analytics After Test Variation Is Set

If you're running a test using Content Experiments, you need to bucket your user into an experiment group before the first pageview is sent to Google Analytics. Putting the experiment code above your Tag Manager snippet will avoid this issue.

But, if you're running your experiment in Google Tag Manager using the Content Experiment API, you'll need to delay your default pageview from firing until after this happens.

Note: You probably shouldn't run your test in Google Tag Manager; ideally, test bucketing and changes occur before anything is rendered on the page, and if your snippet is after the opening <body> tag, page elements might load before you can handle this appropriately. Make sure that this is a good solution for your needs, but defer to putting the snippet as high in the <head> as possible.

I handle this by creating blocking rules that match the conditions users might be bucketed into the test, then adding the following after calling the cxApi.chooseVariation() method:

<script>
  var dataLayer = dataLayer || [];
  dataLayer.push({
    'event': 'variationChosen'
  });
</script>

Then I copy my Google Analytics tag and set its firing rule to {{event}} equals 'variationChosen'. If you're using the copy and paste tag from the configuration menu, this shouldn't be an issue.

Have a tag you'd like to contribute, or notice something I could tweak and improve? Tweet it to me at @notdanwilkerson or email it to me at notdanwilkerson@gmail.com.

Google Analytics: How to Set Up a Simple Goal

Google Analytics provides a great feature for website owners to be able to track specific campaigns, also called a goal. It can be places on pages, forms, or anything you are wanting to track for to see if a campaign has an effective website conversion. It also tracks how the visitor arrived to the area…

The post Google Analytics: How to Set Up a Simple Goal appeared first on Diamond Website Conversion.

google-analytics-thumbnailGoogle Analytics provides a great feature for website owners to be able to track specific campaigns, also called a goal. It can be places on pages, forms, or anything you are wanting to track for to see if a campaign has an effective website conversion. It also tracks how the visitor arrived to the area you want to convert.

This works great after you’ve tried A/B Testing so you can verify the results from live traffic. In this article, you’ll learn how to set up a simple goal in Google Analytics.

Google Analytics: How to Set Up a Simple Goal

Please note, if you haven’t added your site to Google Analytics, then you can’t take advantage of the goal tool until you do. Aside from adding your site to Google Analytics, you will also need to apply the generated tracking code to your website.

The first step is in creating a simple goal is by clicking on your site in the Google Analytics dashboard. On the right hand side, scroll down to the area called Conversions. If you click on it, the area will expand and show you other links. Look for the area called overview as shown below.

googleanalytics-goals-screenshot-1

Now, you can either do this and be led to set up a simple goal or you can also click the Admin tab at the top. Image is below. In order to view the image larger and much better, you will have to right click on the image to open it in a new tab or window.

googleanalytics-goals-screenshot-2

On the last column under View, is an area called Goals. You’ll click that and be led to the page that has an area much like the image below.

googleanalytics-goals-screenshot-3

Click on the red button to create a goal. Once you have, you will need to name your goal and tell it hat type of tracking you want. In the case of this tutorial, and it being how to set up a simple goal, we’ll choose the first option called Destination. This is great for contact forms or lead generation forms. Once you have selected the option on how you want to track your goal, then click the blue button that says Next Step. See the example image below to see how you should proceed.

googleanalytics-goals-screenshot-4

In the next step, you tell it what page you are wanting to land on. You do not put the full URL. See the image below for how this step should go.

googleanalytics-goals-screenshot-5

Before hitting the blue button that says Create Goal, make sure to click the link that says Verify this Goal. This helps to make sure that your goal will work and checks it against your previous 7 days of stats on Google Analytics. In the case that you just joined and don’t have 7 days of stats, then proceed by clicking the button to create the goal. You can always check after a few days if the goal is actually working.

Once this has been set up, you won’t have to mess with it any more. You can just sit back and analyze how your goal is doing. Simple, right? There are other ways you can set up a goal in Google Analytics, like how long visitors are staying on your site (called Destination), by how many pages visits (Pages/Screens per Visit), or Event (like from watching a video.)

Have you taken advantage of setting up a goal in Google Analytics? Did you find it easy?

The post Google Analytics: How to Set Up a Simple Goal appeared first on Diamond Website Conversion.

8 Indispensable Google Tag Manager Variables

Variables are dynamic bits of information that can be used within Google Tag Manager Tags, Rules, and even between Variables. They look something like this: {{Variable Name}}. These can get the value of 1st Party Cookies, JavaScript Variables, Data Layer Variables, and the ‘Custom JavaScript’ macro lets you extend the functionality of Variables nearly limitlessly. For a great overview of everything on offer, check out Simo Ahava’s complete guide to all of the default Variables. Here’s a list of some of my personal favorites.

1. User Agent

The User Agent is a string of text that identifies the “software (a software agent) that is acting on behalf of a user”. In our case, this is the browser and device used to access our website. For example, here’s yours:

You can test the User Agent to detect what browser a user is accessing your site with. This can be helpful if you want to track certain browser-based information (outside of what GA already collects) or change or exclude portions of your tag for users on particular browsers.

Since the User Agent is stored in the navigator.userAgent property, all you have to do is create a JavaScript Variable Variable (yes, ‘Variable Variable’) like below:

Select the variable type 'JavaScript Variable' and enter 'navigator.userAgent' into the input

For example, if you wanted to run a test and exclude any users of Internet Explorer 8 or below, you could do the following:

var isIeEightOrBelow = {{User Agent}}.match(/MSIE [2-8]/i) > -1 ? true : false;
if (isIeEightOrBelow) {
  // some code
} else {
  // some other code, or nothing.
}

You could also block an entire tag by using the same match as a blocking rule:
Blocking IE8 with Tag ManagerWARNING: User agent tests are often unreliable. Never hinge site-critical functionality on a user agent test; use feature detection instead.

2. Week of the Year

Having the week of the year handy is more useful than you might first expect; one thing I like to do is store the week and year with a converting user, so that I can perform acquisition cohort analysis within Google Analytics. This snippet (courtesy of RobG on Stack Overflow) extends the built-in Date object to allow you to get the current week of the year.

function() {
  Date.prototype.getWeekNumber = function(){
    var d = new Date(+this);
    d.setHours(0,0,0);
    d.setDate(d.getDate()+4-(d.getDay()||7));
    return Math.ceil((((d-new Date(d.getFullYear(),0,1))/8.64e7)+1)/7);
  };
  return new Date().getWeekNumber();
}

This is a great way to segment data and learn how user behavior changes over time. This can also be helpful for analyzing the impact new products or features has on your business.

Update: With the new Cohort Analysis Report, you can do some of this style of reporting natively. That said, you can only look at a limited set of cohorts in the data, so this is still a good back-up.

3. Mobile User

This is a snippet courtesy of Michael Zaporozhets on Stack Overflow; it’s a function that will return True if the user is on a mobile device, according to their user agent.

function() {
  window.mobilecheck = function() {
  var check = false;
  (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);
  return check; }
  return window.mobilecheck();
}

This can be a useful piece of information if you’d like to prevent certain tags from firing on mobile devices, or if you’d like to exclude mobile users from a Content Experiment. The above warning about using the User Agent still applies.

4. The Page Title

This is a simple set of Macros that can come in handy for a number of reasons; say, for example, your site returns content on the same path, but with a huge variety in what content it returns based on some byzantine query string structure. In that case, the Page Title might expose some useful information. Fortunately, this is easily accessible through the document.title property. Just configure the Macro like you see below:
Select 'JavaScript Variable' for your Macro type, then enter 'document.title' in the input

Of course, Google Analytics will already capture the Page Title for you, but should you need to combine that data with another data point for deeper context, this is handy to have.

5. The Meta Description

The meta description can also be a useful piece of information to have, either to pull data from or to push into Google Analytics. One example of how this can be used is to fire an event on every pageview that stores the meta description and the URL it was fired on; this can be helpful for tracking down duplicate or blank meta descriptions. Of course, you can also see this data inside the HTML Suggestions section of Google Webmaster Tools.

function() {
  var metas = document.getElementsByTagName('meta');
  for (var i = 0; i 

Update: Jim Gianoglio of LunaMetrics fame pointed out that this could be accomplished JavaScript-free by using the below JavaScript Variable macro:
Example JavaScript Macro with document.head.children.description.content entered as the value

The value entered above is document.head.children.description.content, which will return the Meta Description or Undefined. Google Tag Manager helpfully catches errors for missing properties.

6. The Environment

If your site is developed and runs in several different environments, such as a development environment, a staging environment, and a production environment, it can be useful to modify tag behavior based on which enviroment the tag is operating in. For example, I wouldn't want my Google Analytics tag sending data to my production Google Analytics account from activity taking place in my development area. This could dirty my data with extra transactions, events, and other site metrics. Even a few extra test transactions run for Quality Assurance can skew the data.

There are a few ways to handle this.

A.) Have your developers populate the environment in the Data Layer

You can have your development team add a Data Layer variable that specifies what environment the site is currently being loaded in, like this:

var dataLayer = window.dataLayer|| (window.dataLayer = []);
dataLayer.push({'environment':'staging'});

B.) Detect the environment based on the hostname

If your development and staging environments live at different hostnames, like 'mysitestaging.com', you can create a Custom JavaScript Macro that returns the environment based on what it sees in the hostname, like this:

function() {
  var hostname = {{Page Hostname}};
  if (hostname === 'mysite.com') return 'Production';
  if (hostname === 'mysitestaging.com') return 'Staging';
}

Update: Pavel Jašek pointed out to me on Twitter that lookup tables could be used in place of custom JavaScript; this is a much better way to go about it. Something like below would suffice:
An example lookup table with a list of potential hostnames and their corresponding environment strings

C.) Detect the environment by testing something else

If, for some reason, your testing enviroment is operating at the same hostname that your production environment is in, you'll have to be creative and determine another authoritative test to run in order to figure out which environment you're running in. Here's a handful of ideas:

  • Try and access a service available only in one environment, like an outside API
  • Check the hostname of resources loaded on the page, like images, CSS, or JavaScript
  • Search external stylesheets or JavaScript for comments – typically these will be minified out in Production

7. The Google Analytics UA Number

The UA number is the number associated with the Google Analytics property that a hit is being sent off to. Having this handy can be useful for either configuring things on the fly or testing data before takng certain actions. If your site only operates in one environment, this is a snap:

function() {
  return 'UA-XXXXX-XX';  // Enter in your UA number here
}

Update: The above is a valid, but more roundabout way to accomplish this – I’ve left it there for posterity, but I would recommend instead using a Constant macro for a single UA number, like below:
Example Constant macro with a Google Analytics UA number stored as the value
However, if you’d like to use a different property for each environment (you should), then you might do something like this:

function() {
  var environment = {{environment}};
  if ( environment === 'Production' ) {
    return 'UA-XXXXX-XX';
  }
  if ( environment === 'Staging' ) {
    return 'UA-YYYYY-YY'; 
  }
}

Update: Per the above update, a lookup table would be a better option here. Here’s what it might look like:
An example lookup table for a Google Analytics UA Number, keyed by environment
Pavel also recommended this article on lookup tables by Simo Ahava.

8. Google Analytics User ID

Whenever a user visits your site, Google Analytics assigns them a unique, random identifier. This value is stored inside the cookie that Google Analytics sets on the browser. I like to capture it and store it inside Google Analytics as a Custom Dimension or Custom Variable; it can come in handy when trying to track down specific user behavior across visits or transactions.

There are two ways to get to this data – either by extracting it from the Google Analytics cookies directly, or, with the Universal Analytics library, asking for it politely.

Option 1: Cookie Sniffing

FOR CLASSIC ANALYTICS:
// Only works if __utma cookie has been set
function() {
  var __utmaCookie = document.cookie.match(/__utma=(.*?)(?:;|$)/);
  if(__utmaCookie && __utmaCookie[1]) {
    var utmaVals = __utmaCookie[1].split('.');
    if(utmaVals[2]) {
      return utmaVals[1] + '.' + utmaVals[2];
    }
  }
}
FOR UNIVERSAL ANALYTICS:
// Only works if _ga cookie has been set
function () {
  var _gaCookie = document.cookie.match(/_ga=(.*?)(?:;|$)/);
  if(_gaCookie && _gaCookie[1]) {
    return  _gaCookie[1].match(/\d+\.\d+$/)[0];
  }
}

Option 2: Asking Politely (Tracker Properties; Universal Only)

FOR UNIVERSAL ANALYTICS WITHOUT A NAMED TRACKER (TYPICAL):
function() {

  // Fetch the GA Library
  var gaLib = window[ window.GoogleAnalyticsObject ];
  var trackers = gaLib.getAll();
  var uaNumber = {{UA Number}};

  for ( var i = 0; i 

FOR UNIVERSAL ANALYTICS WITH A NAMED TRACKER (UNUSUAL):

function() {

  var gaLib = window[window.GoogleAnalyticsObject];
  var tracker = gaLib.getByName({{Tracker Name}});

  if(tracker) {

    return tracker.get('clientId');

  }

}

Those are some of my favorite Custom Variables; what are yours? Share with me on Twitter at @notdanwilkerson.

Variables are dynamic bits of information that can be used within Google Tag Manager Tags, Rules, and even between Variables. They look something like this: {{Variable Name}}. These can get the value of 1st Party Cookies, JavaScript Variables, Data Layer Variables, and the 'Custom JavaScript' macro lets you extend the functionality of Variables nearly limitlessly. For a great overview of everything on offer, check out Simo Ahava's complete guide to all of the default Variables. Here's a list of some of my personal favorites.

1. User Agent

The User Agent is a string of text that identifies the "software (a software agent) that is acting on behalf of a user". In our case, this is the browser and device used to access our website. For example, here's yours:

You can test the User Agent to detect what browser a user is accessing your site with. This can be helpful if you want to track certain browser-based information (outside of what GA already collects) or change or exclude portions of your tag for users on particular browsers.

Since the User Agent is stored in the navigator.userAgent property, all you have to do is create a JavaScript Variable Variable (yes, 'Variable Variable') like below:

Select the variable type 'JavaScript Variable' and enter 'navigator.userAgent' into the input

For example, if you wanted to run a test and exclude any users of Internet Explorer 8 or below, you could do the following:

var isIeEightOrBelow = {{User Agent}}.match(/MSIE [2-8]/i) > -1 ? true : false;
if (isIeEightOrBelow) {
  // some code
} else {
  // some other code, or nothing.
}

You could also block an entire tag by using the same match as a blocking rule:
Blocking IE8 with Tag Manager WARNING: User agent tests are often unreliable. Never hinge site-critical functionality on a user agent test; use feature detection instead.

2. Week of the Year

Having the week of the year handy is more useful than you might first expect; one thing I like to do is store the week and year with a converting user, so that I can perform acquisition cohort analysis within Google Analytics. This snippet (courtesy of RobG on Stack Overflow) extends the built-in Date object to allow you to get the current week of the year.

function() {
  Date.prototype.getWeekNumber = function(){
    var d = new Date(+this);
    d.setHours(0,0,0);
    d.setDate(d.getDate()+4-(d.getDay()||7));
    return Math.ceil((((d-new Date(d.getFullYear(),0,1))/8.64e7)+1)/7);
  };
  return new Date().getWeekNumber();
}

This is a great way to segment data and learn how user behavior changes over time. This can also be helpful for analyzing the impact new products or features has on your business.

Update: With the new Cohort Analysis Report, you can do some of this style of reporting natively. That said, you can only look at a limited set of cohorts in the data, so this is still a good back-up.

3. Mobile User

This is a snippet courtesy of Michael Zaporozhets on Stack Overflow; it's a function that will return True if the user is on a mobile device, according to their user agent.

function() {
  window.mobilecheck = function() {
  var check = false;
  (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);
  return check; }
  return window.mobilecheck();
}

This can be a useful piece of information if you'd like to prevent certain tags from firing on mobile devices, or if you'd like to exclude mobile users from a Content Experiment. The above warning about using the User Agent still applies.

4. The Page Title

This is a simple set of Macros that can come in handy for a number of reasons; say, for example, your site returns content on the same path, but with a huge variety in what content it returns based on some byzantine query string structure. In that case, the Page Title might expose some useful information. Fortunately, this is easily accessible through the document.title property. Just configure the Macro like you see below:
Select 'JavaScript Variable' for your Macro type, then enter 'document.title' in the input

Of course, Google Analytics will already capture the Page Title for you, but should you need to combine that data with another data point for deeper context, this is handy to have.

5. The Meta Description

The meta description can also be a useful piece of information to have, either to pull data from or to push into Google Analytics. One example of how this can be used is to fire an event on every pageview that stores the meta description and the URL it was fired on; this can be helpful for tracking down duplicate or blank meta descriptions. Of course, you can also see this data inside the HTML Suggestions section of Google Webmaster Tools.

function() {
  var metas = document.getElementsByTagName('meta');
  for (var i = 0; i < metas.length; i++) {
    if (metas[i].name === 'description') {
      return metas[i].content;
    }
  }
  return 'None found';
}

Update: Jim Gianoglio of LunaMetrics fame pointed out that this could be accomplished JavaScript-free by using the below JavaScript Variable macro:
Example JavaScript Macro with document.head.children.description.content entered as the value

The value entered above is document.head.children.description.content, which will return the Meta Description or Undefined. Google Tag Manager helpfully catches errors for missing properties.

6. The Environment

If your site is developed and runs in several different environments, such as a development environment, a staging environment, and a production environment, it can be useful to modify tag behavior based on which enviroment the tag is operating in. For example, I wouldn't want my Google Analytics tag sending data to my production Google Analytics account from activity taking place in my development area. This could dirty my data with extra transactions, events, and other site metrics. Even a few extra test transactions run for Quality Assurance can skew the data.

There are a few ways to handle this.

A.) Have your developers populate the environment in the Data Layer

You can have your development team add a Data Layer variable that specifies what environment the site is currently being loaded in, like this:

var dataLayer = window.dataLayer|| (window.dataLayer = []);
dataLayer.push({'environment':'staging'});

B.) Detect the environment based on the hostname

If your development and staging environments live at different hostnames, like 'mysitestaging.com', you can create a Custom JavaScript Macro that returns the environment based on what it sees in the hostname, like this:

function() {
  var hostname = {{Page Hostname}};
  if (hostname === 'mysite.com') return 'Production';
  if (hostname === 'mysitestaging.com') return 'Staging';
}

Update: Pavel Jašek pointed out to me on Twitter that lookup tables could be used in place of custom JavaScript; this is a much better way to go about it. Something like below would suffice:
An example lookup table with a list of potential hostnames and their corresponding environment strings

C.) Detect the environment by testing something else

If, for some reason, your testing enviroment is operating at the same hostname that your production environment is in, you'll have to be creative and determine another authoritative test to run in order to figure out which environment you're running in. Here's a handful of ideas:

  • Try and access a service available only in one environment, like an outside API
  • Check the hostname of resources loaded on the page, like images, CSS, or JavaScript
  • Search external stylesheets or JavaScript for comments - typically these will be minified out in Production

7. The Google Analytics UA Number

The UA number is the number associated with the Google Analytics property that a hit is being sent off to. Having this handy can be useful for either configuring things on the fly or testing data before takng certain actions. If your site only operates in one environment, this is a snap:

function() {
  return 'UA-XXXXX-XX';  // Enter in your UA number here
}

Update: The above is a valid, but more roundabout way to accomplish this - I've left it there for posterity, but I would recommend instead using a Constant macro for a single UA number, like below:
Example Constant macro with a Google Analytics UA number stored as the value However, if you'd like to use a different property for each environment (you should), then you might do something like this:

function() {
  var environment = {{environment}};
  if ( environment === 'Production' ) {
    return 'UA-XXXXX-XX';
  }
  if ( environment === 'Staging' ) {
    return 'UA-YYYYY-YY'; 
  }
}

Update: Per the above update, a lookup table would be a better option here. Here's what it might look like:
An example lookup table for a Google Analytics UA Number, keyed by environment Pavel also recommended this article on lookup tables by Simo Ahava.

8. Google Analytics User ID

Whenever a user visits your site, Google Analytics assigns them a unique, random identifier. This value is stored inside the cookie that Google Analytics sets on the browser. I like to capture it and store it inside Google Analytics as a Custom Dimension or Custom Variable; it can come in handy when trying to track down specific user behavior across visits or transactions.

There are two ways to get to this data - either by extracting it from the Google Analytics cookies directly, or, with the Universal Analytics library, asking for it politely.

Option 1: Cookie Sniffing

FOR CLASSIC ANALYTICS:
// Only works if __utma cookie has been set
function() {
  var __utmaCookie = document.cookie.match(/__utma=(.*?)(?:;|$)/);
  if(__utmaCookie && __utmaCookie[1]) {
    var utmaVals = __utmaCookie[1].split('.');
    if(utmaVals[2]) {
      return utmaVals[1] + '.' + utmaVals[2];
    }
  }
}
FOR UNIVERSAL ANALYTICS:
// Only works if _ga cookie has been set
function () {
  var _gaCookie = document.cookie.match(/_ga=(.*?)(?:;|$)/);
  if(_gaCookie && _gaCookie[1]) {
    return  _gaCookie[1].match(/\d+\.\d+$/)[0];
  }
}

Option 2: Asking Politely (Tracker Properties; Universal Only)

FOR UNIVERSAL ANALYTICS WITHOUT A NAMED TRACKER (TYPICAL):
function() {

  // Fetch the GA Library
  var gaLib = window[ window.GoogleAnalyticsObject ];
  var trackers = gaLib.getAll();
  var uaNumber = {{UA Number}};

  for ( var i = 0; i < trackers.length; i++ ) {
    if ( trackers[i].get('trackingId') === uaNumber ) {
      return trackers[i].get('clientId');
    }
  }
}

FOR UNIVERSAL ANALYTICS WITH A NAMED TRACKER (UNUSUAL):

function() {

  var gaLib = window[window.GoogleAnalyticsObject];
  var tracker = gaLib.getByName({{Tracker Name}});

  if(tracker) {

    return tracker.get('clientId');

  }

}

Those are some of my favorite Custom Variables; what are yours? Share with me on Twitter at @notdanwilkerson.

Webinar: Turn Your Website Visitors to Buying Customers Using Email

With the dawn of the new school year, it must be about time for the annual death toll of email marketing. Between social media and mobile marketing, some people will tell you that email no longer gets a look in. … Continue reading

With the dawn of the new school year, it must be about time for the annual death toll of email marketing. Between social media and mobile marketing, some people will tell you that email no longer gets a look in. The average inbox gets hundreds more emails every month than it did just a few years ago, making it more and more difficult to get heard over all that noise.

Rubbish!

Not only is the ROI on email marketing still excellent, for the savvy internet marketer, the increased noise actually makes it easier to rise to the surface with relevant, valuable content.

But have you thought about how you’re going to get that wonderful content of yours in front of your ideal customer’s eyes? With the increase in noise, it has become even more vital to carefully target your website visitors so that your opt-in offer is presented at just the right time. Regular Padiact users will know that when it comes to highly targeted offers, we love to help!

PadiAct & INinbox Webinar

padiact-ininbox-webinarAnd today it gets one step better… we’ve teamed up with email provider, INInbox.com, to bring you an exclusive webinar. We’ll share with you exactly how Padiact and INinbox can work together to supercharge your website traffic from ‘meh’ to ‘magic’.

If you’ve been wondering what it really takes to build a successful business with email marketing this is one webinar you won’t want to miss. We’ll also be digging into our best lessons from collecting over 5 million leads for our customers, as well as giving you specific steps you can take to achieve maximum success from the integration between Padiact and your email provider.

The date and time to add to your calendar is Tuesday September 9th at 11am EST.

There are limited spaces available for this webinar so click here to register instantly.

register-for-free

Average Session Duration – What is it and Why Bloggers Should Care

In Google Analytics, one of the statistics measures is average session duration. In simple terms, this is the amount of the time that a person spends on your website. This article will help you understand average session duration and if you’re a blogger, perhaps persuade you to take a better look into this piece of…

The post Average Session Duration – What is it and Why Bloggers Should Care appeared first on Diamond Website Conversion.

averagesessionduration-thumbnailIn Google Analytics, one of the statistics measures is average session duration. In simple terms, this is the amount of the time that a person spends on your website. This article will help you understand average session duration and if you’re a blogger, perhaps persuade you to take a better look into this piece of information.

As an extra goodie, there will be a few brief tips to hopefully get those visitors to stay longer.

Average Session Duration – What is it and Why Bloggers Should Care

As mentioned before, the average session duration is the average time of all the time spent on your site by your visitors. This time is usually a great indicator of how interested people are with the content on your website, regardless if it is something you are selling or not.

The smaller the number that the average session duration is, means that you’ve got a lot of work to do in either jazzing up your content, or creating new articles that your visitors are truly interested in seeing. You also would need to try to entice those visitors to stay on your website longer.

For example, if your visitors are only on your website for less than a minute and a half, you probably need to be concerned. Of course, Google Analytics has other tools you can look at after looking at your average session duration statistic. Usually you will want to check out where the visitors are coming to your site and where they are leaving. If the entrance and exit of your website, especially a blog, is the front page, then you’ve got a problem with the front of your website.

Possible Problems that Could be the reason for a poor Average Session Duration stat

  • Poor Navigation – If you don’t give people a clear path in order to navigate your website, they probably won’t go any further than the front page, or if you’re lucky, one article.
  • The design is undesirable. – A lot of people are visual. If your people can’t identify with you and remember you, they might not be back. Some bloggers who choose minimalistic designs often sacrifice their branding.
  • There are no effective calls to action. – If you are giving people a reason to come back, they won’t. Ask them to subscribe to your newsletter. Encourage the to follow you on the social networks. Encourage them to use your contact form or click on your about page to learn more about you and what your website is about.
  • The articles have boring titles. – People aren’t enticed to click on and read articles that are unappealing. Be concise and try to think of what spurs you on to clicking and reading a blog post based on the title. You can learn a lot from visiting leaders in your niche to see what’s most effective.
  • The website is just confusing. – If people don’t know what your website is about, and why they should be there rather than some other site, then they won’t be back. Give them a reason. If you’re not sure, go back to your original site focus plan and tweak it.
  • No plan to keep visitors once they’ve clicked deeper into the website. – Once people are within your website, whether it’s a blog post, or your shopping cart, or landing page, you need to keep them there. Entice them with linking to other articles within your site, in your post’s content. You could also benefit from either showing some most recent posts or related posts, or both.

Average duration session is definitely an important factor in website conversion. The goal is to keep them there as long as possible because that WILL get the subscriber, the social share, the commentator, and above all, THE SALE!

Do you pay attention to your average session duration stat for your website?

The post Average Session Duration – What is it and Why Bloggers Should Care appeared first on Diamond Website Conversion.

Getting a Handle on Site Speed

One of my greatest challenges has been to convince clients that they have a slow loading site AND that a slow loading website reduces the number of sales or leads they can expect to get. I’ve shown them the pretty waterfall charts that show that their site loads in 6.7 seconds – only to have…

The post Getting a Handle on Site Speed appeared first on Diamond Website Conversion.

One of my greatest challenges has been to convince clients that they have a slow loading site AND that a slow loading website reduces the number of sales or leads they can expect to get.

I’ve shown them the pretty waterfall charts that show that their site loads in 6.7 seconds – only to have their eyes glaze over.

I touch on it when we’re reviewing their Google Analytics and pointed out that page load times are now part of Google’s search algorythm – and still no response.

Then I discovered a secret weapon….the video of a site loading from webpagetest.org. There is nothing like seeing a blank screen while those seconds tick off to convince clients that site speed is important.

Site speed test from Webpagetest.org.  Notice how at 1.4 seconds 0% loaded and at 1.7 seconds 67% is loaded

Site speed test from Webpagetest.org. Notice how at 1.4 seconds 0% loaded and at 1.7 seconds 67% is loaded

 

Why Page Load Times Matter

According to the research firm Aberdeen Group Inc., a 1-second delay in web page load time translates into a 7% loss in conversions. This means that for each 10,000 in monthly sales, you stand to lose $700 or $8,400 per year.

We all want websites with cool features that attract attention and hold interest. But if that technology causes delays or fails to work properly, visitors won’t wait around….they’re off to something else.

Tag Man in partnership with glasses e-retailer Glasses Direct ran a test to study page speed and conversion behavior.

As expected, the study found that page-load speeds impacted conversion rates. The conversion rate peaked at about two seconds, dropping by 6.7% for each additional second.

Conversions peak at 1-2 second load times.  Source Tagman case study of Glasses Direct

Conversions peak at 1-2 second load times. Source Tagman case study of Glasses Direct

Two studies by Akamai and Gomez are frequently cited in reports on site speed. Both reports are several years old now, but what are the odds that visitor expectations have gone down?

The Akamai Study published in September 2009 interviewed 1048 online shoppers and reported the following:

  • 47% of the people expect a web page to load in two seconds or less
  • 40% will abandon a web page if it takes longer than three seconds to load
  • 52% of online shoppers claim that quick page loads are important for their loyalty to a site
  • 64% of shoppers who are dissatisfied with their site visit will go somewhere else to shop next time.

Remember this was 2009….with all the advances we’ve seen in technology and the emphasis on reducing page load times – do you believe that a site that takes over 2 seconds to load won’t impact visitor behavior?

Two interesting additional points came out of the The Gomez Report published in 2010 which interviewed 1500 consumers about their opinions:

  • 58% of mobile device users expect sites to download as quickly as they would on their home computers
  • 61% of mobile users said that poor performance would make them less likely to visit the mobile website again.

If you’re like most website owners, mobile traffic to your site is rising. It’s common to see 25% or more of your website visitors coming from mobile devices. Are you meeting your customer’s expectations for quick page load times on mobile devices? Probably not.

Responsive Design and Site Speed

In a month-long study of 12 e-retail responsive design sites conducted by Keynote, ¹ reported that the average load times by device were:

  • Desktop PCs 3.14 seconds (high-speed connections)
  • Tablets 2.8 seconds (high-speed connections)
  • Smart Phones 18.24 seconds (combination 3G and 4G connections)

The companies interviewed spent a lot of time, money, and effort in designing, building and tweaking their sites for mobile visitors.

As Mike Clem, vice-president of e-commerce at Sweetwater commented, templates with a “one-size-fits-all” approach carry a lot of additional, unnecessary code and this slows performance, because all that code has to load before the visitor can see the page on their desktop, tablet, or smartphone.²

What to do next?

Start by getting a clear idea of your site’s page load times. Get a combination of data from Webmaster Tools, Google Analtyics and services like YSlow, WebPageTest, and Pingdom. Look for commonalities to figure out what’s slowing down your site and pick off the biggest offenders first. A good developer can be of tremendous help here.

Next tackle the core of the problem. You’ll never cure poor site speed by tinkering around the edges of your website. For a WordPress site, this would include the following:

  • A clean theme with clean code – get rid of that unnecessary code. If you can afford a custom theme written specifically for your site, great – if you can’t, make sure that the template you use doesn’t carry a lot of excess baggage.
  • Switch off all the plugins you don’t need or use. Watch the page load times on the plugins you use and switch out of load-time hogs if you can.
  • Optimize images and graphics – Size your images before you load them into wordpress – if you can get away with lower resolutions without loss of quality, you’ll save some seconds.
  • Fast web hosting configured specifically for WordPress along with a caching strategy

Site speed is an ongoing challenge. As you make changes to your site, update plugins and themes and add additional features – be sure to test the impact on your site speed.

____________________________________________________________________________________________

¹ Siwicki, Bill. “The Ugly Truth about Responsive Design (and how to fix it).”  Internet Retailer June 2014: 42-54. Print.

² Siwicki, Bill. “The Ugly Truth about Responsive Design (and how to fix it).”  Internet Retailer June 2014: 42-54. Print.

 

The post Getting a Handle on Site Speed appeared first on Diamond Website Conversion.