Archives March 2019

12 SEO Best Practices That Everyone Should Follow

Most lists of SEO best practices are packed to the brim with bad, out of date advice. Either that or they focus on things that only apply to a small percentage of readers.

In other words, they’re lists of SEO tips—not best practices.

Best practices should be followed by everyone, whether you’re running a blog, ecommerce store, or local brick and mortar store.

In today’s post, we’re going to cover the most essential best practices to follow for every page on your site.

1. Use HTTPs

HTTPS makes the pages on your site more secure by encrypting information sent between the visitor and server. It’s been a Google ranking factor since 2014.

You can tell if your site is already using HTTPS by checking the loading bar in your browser.

If there’s a lock icon before the URL, then you’re good.

1 https2

1 https2

If not, you need to install an SSL certificate.

Lots of web hosts offer these in their packages. If yours doesn’t, you can pick one up for free from LetsEncrypt.

The good news is that switching to HTTPS is a one-time job. Once installed, every page on your site should be secure—including those you publish in the future.

2. Make sure your pages load fast

Nobody wants to visit a page that takes forever to load. That’s why page speed is a ranking factor for desktop since 2010, and for mobile since 2018.

Lots of factors affect page speed, including your site’s code, server location, and images.

You can get a rough sense of how your pages perform using Google’s Pagespeed Insights tool. Just plug in a URL, and you’ll see a score between 0–100, followed by improvement advice.

2 pagespeed insights

2 pagespeed insights

The issue with Pagespeed Insights is that you can only test one page at a time.

Solve this by signing up for Google Search Console, and checking the Speed report. This shows you which pages are loading slowly on desktop and mobile, and why.

3 speed report

3 speed report

Some of these issues can be complicated, so your best bet is to ask a developer (or technical SEO expert) to fix them.

Here are some general tips for keeping your pages fast:

  • Use a CDN. Most sites live on one server in one location. So, for some visitors, data has to travel long distances before it appears in their browser. This is slow. CDNs solve this by copying critical resources like images to a network of servers around the globe so that resources are always loaded locally.
  • Compress images. Image files are big, which makes them load slowly. Compressing images decreases the file size, which makes them faster to load. You just need to balance size with quality.
  • Use lazy-loading. Lazy-loading defers the loading of offscreen resources until you need them. This means that the browser doesn’t need to load all of the images on a page before it’s usable.
  • Use an optimized theme. Choose a well-optimized website theme with efficient code. Run the theme demo through Google’s Pagespeed Insights tool to check.

3. Target a topic with ‘search traffic potential’

Keyword research is a critical component of SEO. There’s no point putting time, effort, and money into trying to rank for things that nobody is searching for (unless you just want to attract links).

For example, say you sell software tutorials. It wouldn’t make sense to target a keyword like “how do i make the font larger in coffee cup html editor” because it has no search volume.…

4 low sv

4 low sv

.… and the top-ranking page gets no organic traffic:

4 no traffic

4 no traffic

But while search volume is a reasonable indicator of traffic potential for this keyword, it can be misleading.

Just take a look at these two keywords:

5 keywords explorer sv

5 keywords explorer sv

The former has a higher monthly search volume, but the top-ranking result only gets an estimated 65 monthly US organic visits…

6 low traffic

6 low traffic

… compared to 191 visits to the page in pole position for the lower volume keyword:

7 higher traffic

7 higher traffic

This happens because the page ranking for the lower volume keyword is part of a broader topic, and gets traffic from other keywords.

In other words, more people are looking for a coffeecup tutorial than a review.

So, while search volume is a good way to filter for keyword ideas, always make sure to check estimated traffic to the pages that rank to get a better idea of true search traffic potential.

4. Match search intent

Nobody wants to see product pages in the search results for “how to make a protein shake.”

Those people are in learning mode, not buying mode.

Google understands this, which is why all of the top results are blog posts—not pages selling protein powder.

Screenshot 2020 02 15 at 03.52.26

Screenshot 2020 02 15 at 03.52.26

The opposite is true for a query like “buy protein powder.”

People aren’t looking for a protein shake recipe; they’re looking to buy some powder. This is why most of the top 10 results are ecommerce category pages, not blog posts.

Screenshot 2020 02 15 at 03.52.47

Screenshot 2020 02 15 at 03.52.47

Looking at Google’s top results like this can tell you a lot about the intent behind a query, which helps you understand what kind of content to create if you want to rank.

Let’s take a look at a less obvious keyword like “best eye cream,” which gets an estimated 21k monthly searches in the US.

8 best eye cream ke

8 best eye cream ke

For an eye cream retailer, it might seem perfectly logical to try to rank a product page for this keyword. However, the search results tell a different story:

9 list posts

9 list posts

Almost all of them are list-style blog posts, not a product pages.

To stand any chance of ranking for this keyword, you’d need to follow suit.

Catering to search intent goes way beyond creating a certain type of content. You also need to consider the content format and angle.

Learn more about these in our guide to optimizing for search intent.

5. Target a topic in your wheelhouse

Competitive keywords are often dominated by large brands with insane backlink profiles and deep pockets.

Just take a look at the number of referring domains to the pages ranking for “best credit card”:

10 best credit card rds

10 best credit card rds

The results are dominated by big players like NerdWallet, Credit Karma, and, and the average number of referring domains (backlinks from unique websites) to the top five results is over 300.

Ranking for this keyword in the short-to-medium term would be impossible for 99% of people.

That’s why it pays to go after keywords in your wheelhouse.

In this case, that might be something like “best credit cards for lounge access”:

11 best credit cards for lounge access

11 best credit cards for lounge access

While the search volume and organic traffic potential are much lower than for a competitive keyword like “best credit cards,” there are fewer big brands to compete with, and you won’t need as many backlinks to rank.

How can you find easier topics to go after?

Go to Ahrefs’ Keywords Explorer, search for a broad topic, then check the “Phrase match” report. Next, filter for keywords with a low Keyword Difficulty score—under 20 is a good starting point.

12 low kd

12 low kd

If the suggestions aren’t that relevant, use the Include filter to narrow things down. For example, let’s filter our list to include only keywords with the word “best.”

13 low kd best

13 low kd best

You can then check the SERP to assess difficulty and competitiveness further.

6. Use your target keyword in three places

Every topic has a “head” keyword, which is the most common way people search whatever your page is about.

For a post about how to lose weight naturally, this is “natural weight loss”:

14 low weight naturally

14 low weight naturally

There are three places you should include this keyword:

a) Title tag

Google says to write title tags that accurately describe the page’s content. If you’re targeting a specific keyword or phrase, then this should do precisely that.

It also demonstrates to searchers that your page offers what they want, as it aligns with their query.

Is this a hugely important ranking factor? Probably not, but it’s still worth including.

That’s why we do it with almost all our blog posts:

15 keyword title

15 keyword title

Just don’t shoehorn the keyword in if it doesn’t make sense. Readability always comes first.

For example, if your target keyword is “kitchen cabinets cheap,” then that doesn’t make sense as a title tag. Don’t be afraid to rearrange things or add in stop words so it makes sense—Google is smart enough to understand what you mean.

16 kitchen cabinets

16 kitchen cabinets

b) Heading (H1)

Every page should have a visible H1 heading on the page, and it should include your target keyword where it makes sense.

17 h1

17 h1

c) URL

Google says to use words in URLs that are relevant to your page’s content.

Using the query you’re targeting is usually the easiest way to do this:

18 keyword dwell time2

18 keyword dwell time2

7. Use a short and descriptive URL

Google says to avoid using long URLs because they may intimidate searchers.

For that reason, using the exact target query as the URL isn’t always best practice.

Just imagine that your target keyword is “how to get rid of a tooth abscess without going to the dentist.” Not only is that a mouthful (no pun intended), but it’s also going to get truncated in the search results:

18 truncated url

18 truncated url

Removing stop words and unnecessary details will give you something shorter and sweeter while keeping the important words.

19 shorter url

19 shorter url

That said, don’t be afraid to describe your page more succinctly where needed.

20 short url

20 short url

Note that if your CMS already has a predefined, ugly URL structure, it’s not a huge deal. And it’s certainly not worth jumping through countless hoops to fix. Google is showing the full URL for fewer and fewer results these days anyway.

8. Write a compelling title tag and meta description

Optimizing for search engines isn’t just about improving rankings, but also enticing clicks.

This is why you need to write compelling title tags and meta descriptions because they both show up in search results:

Screenshot 2020 02 15 at 04.47.12

Screenshot 2020 02 15 at 04.47.12


Google doesn’t always show the defined title and description in the search results. Sometimes they rewrite the title and choose a more appropriate description from the page for the snippet.

Your title tag and description are effectively your sales pitch.

If neither of them stands out from the crowd, searchers will click a different result. But beyond including your target keyword, how can you improve CTR?

First, try to keep your title tag under 60 characters, and your descriptions under 150 characters. This helps to avoid truncation.

Second, use title case for titles, and sentence case for descriptions.

Third, align your title and description with search intent.

For instance, almost all of the results for “best headphones” specify the year in their titles and descriptions.

21 best headphones

21 best headphones

This is because people want lists of up-to-date recommendations, as new headphones are released all the time.

Fourth, use power words to entice the click—without being clickbait‑y.

22 power words

22 power words

Read more about crafting the perfect title here, or watch this video:

9. Optimize images

Compressing images is vital to ensure fast-loading pages, but this isn’t the only way to optimize images for SEO.

You should also add alt tags and use descriptive filenames.

Both of these things help Google understand your images, which can help your pages rank for long-tail keywords in web search—and in Google Images.

Don’t overlook the importance of Google Images. It’s sent us over 5,500 clicks in the past three months:

22 image clicks

22 image clicks

Optimizing file names is simple. Just describe your image in words, and separate those words with hyphens.

Here’s an example:

pasted image 0 13

pasted image 0 13

Filename: number-one-handsome-man.jpg

For alt tags, do the same—but use spaces, not hyphens.

<img src=".../number-one-handsome-man.jpg" alt="the world's most handsome man">

Alt text isn’t only important for Google, but also for visitors.

If an image fails to load, the browser shows the alt tag to explain what the image should have been:

23 fail to load

23 fail to load

Plus, around 8.1 million Americans have vision impairments and may use a screen reader. These devices read alt tags out loud.

Recommended reading: Image SEO: 12 Actionable Tips (for More Organic Traffic)

10. Write thorough content

Earlier, we mentioned that search volume isn’t always a good predictor of organic traffic potential because many pages also get traffic from long-tail queries.

For instance, this page ranks #1 for “best laptop brands”…

24 fs

24 fs

… but it also ranks in the top 10 for over 300 other keywords like “best computer brands” and “is lenovo a good brand”:

25 top 10 keywords

25 top 10 keywords

This isn’t abnormal.

Our study of three million search queries found that the average top-ranking page ranks in the top 10 for almost 1,000 other keywords.

00 average number also rank for keywords2 1

00 average number also rank for keywords2 1

How do you rank for more queries? Make your content more thorough.

Note that this isn’t about content length, but covering relevant subtopics that people are also searching for. It applies mainly to informational SEO content like blog posts but can help other types of content too.

Here are three ways to find subtopics:

a) Look for relevant keywords on the top-ranking pages

If we look at one of the top-ranking pages for “best laptop brands,” we see relevant keywords like “dell,” “hp,” “quality,” “reliability,” and “hardware.”

26 relevant words

26 relevant words

b) Look at “People also ask” results

For “best laptop brands,” we see a couple of reliability-related questions.

27 paa

27 paa

c) Run a Content Gap analysis

Paste the URLs of three top-ranking pages into Ahrefs’ Content Gap tool. Leave the bottom field blank and hit “Show keywords.”

28 cg 1

28 cg 1

This shows queries that one or more of the top-ranking pages also rank for.

29 cg 2

29 cg 2

Turn off intersections one and two to refine results further.

30 cg 3

30 cg 3

11. Add internal links from other relevant pages

Internal links are those from one page on your website to another.

Generally speaking, the more links a page has—from both external and internal sources—the higher its PageRank. This is the foundation of Google’s ranking algorithm and remains important even today.

Unfortunately, Google discontinued public PageRank scores in 2016, so there’s no way to check them anymore. However, Ahrefs’ URL Rating is a similar metric, and it correlates with rankings.

Ur vs search traffic

Ur vs search traffic

Internal links also help Google understand what a page is about.

Luckily, most CMS’ add internal links to new web pages from at least one other page by default. This might be on the menu bar, on the blog homepage, or somewhere else.

However, it’s good practice to add internal links from other relevant pages whenever you publish something new.

To do that, run a search in Google for [page topic]

This will return the most relevant pages on your site about that topic:

31 internal links

31 internal links

Look for suitable places to add internal links on pages that fit the bill.

You can also find internal link opportunities in Ahrefs’ Site Explorer. Paste in your domain, then go to the “Best by Links” report. This shows you all the pages on your site sorted by URL Rating:

32 bbl url rating

32 bbl url rating

Look for relevant pages and add internal links where appropriate.

Recommended reading: Internal Links for SEO: An Actionable Guide

12. Get more backlinks

Backlinks are the foundation of Google’s algorithm and remain one of the most important ranking factors.

Google confirms this on their “how search works” page, where they say:

If other prominent websites on the subject link to the page, that’s a good sign that the information is of high quality.

But don’t take Google’s word for it…

Our study of over one billion web pages shows a clear correlation between organic traffic and the number of websites linking to a page:

03 referring domains vs search traffic 1

03 referring domains vs search traffic 1

Just remember that this is about quality, not just quantity.

You should aim to build backlinks from authoritative and relevant pages and websites.

Read more about what makes a good backlink here, or watch this video:

Final thoughts

Best practices are a good starting point, but they’re not always enough to rank. There are other important ranking factors to keep in mind and other ways to improve SEO.

Read this post if you’re still struggling to rank higher, or watch this video:

The Mobile Plateau

For years, there has been a relatively deafening klaxon in SEO:


This is not hyperbole. Here are some choice examples.

First up, the top of this mobile SEO guide:

And here is just one of the myriad of examples of it showing up on industry news sites like Search Engine Land.

These sites all use numbers provided by organizations that have a lot to benefit from people investing in Mobile (like Google), and they are all generally based on models that were created during a period of rapid mobile growth.

Personally, I know that lots of industry analysts (including Greg Sterling, author of the linked Search Engine Land piece) have been looking for updated numbers specifically from Google. But I’m not content to just hold my breath and wait for that to happen.

Well, Google just recently launched its Data Set Search (praise be to the Schwartz). I decided to give it a whirl, and my fingers just started searching for mobile user data.

The most recent piece of “big data” that I could find on mobile user rates in the US is from Statista, and it tells a radically different story. They get their data from StatsCounter, which you can see here:

This is specifically for US traffic, which you can see in full glory here. This seems to say that desktop and mobile traffic have reached an equilibrium and the period of explosive mobile growth and desktop decline is over.

This makes a ton of sense. We’ve seen a plateau in the % of mobile traffic across the many verticals in which we work. And some just don’t have much mobile traffic to begin with. For example, this B2B Enterprise Software Company:

Buuuuuut Daaaaaaan, that is a B2B site.

Right random internet stranger the internet is made up a myriad of sites! Here is mobile and desktop traffic for a major hiking site.

58% of its searches are mobile. That is the number that Google said in the Backlinko Mobile SEO Guide… in 2016!!!! Forecasting is hard!!!!

I talked to the SEOs of some major consumer-facing web products and they said they are seeing similar stuff. In fact, one SEO told me that desktop traffic gained traffic share for food delivery in Q4 2019!

Would be great to get some new data from Google and other major players here, as well as some segmentation by industry so that people can make wise technology and marketing investment.

Do you think the mobile growth rate is going to take off again?

UX Checklist Series: Button Design

Buttons are actionable touchpoints for users to engage with content in actionable ways. Small but mighty, buttons can make or break user experience on a website if poorly designed, so it’s important to follow best UX practices when designing buttons.

Pressing buttons is gratifying. From big glowing red buttons to tiny tappable icons on our phones, buttons signify action. We often don’t realize how many buttons we tap or click every day until we have a negative experience; a pesky button that is too small to tap, or a button you click that results in nothing happening, can ruin user experience.

In this post, we’ll walk through how to ensure positive UX with buttons on your site. Follow these guidelines to decide what type of button would work best both for your content and users.

Button Anatomy

5 Types of Buttons

Solid Buttons

Solid buttons point toward a primary action for users to take by standing out on a page as a visual cue for user action. Buttons empower the user to make choices rather than passively engage with content. Therefore, you want solid button actions to be your highest priority action items, whether it be a CTA to sign up for more information or to drive users to another content page.

buttons solid

Example of a Solid button

Line/Ghost Buttons

These buttons are for secondary actions and stand out less on the screen. With a simple color outline, they draw less attention from users but are still differentiated from other content on the page. When a user hovers over the button on desktop, a color fill may “ghost in” to add interactivity.

Example of a Line/Ghost button

FABs (Floating Action Buttons)

Made popular by Google’s Material Design, FABs represent a primary action on a screen, typically conveyed through a single action icon. The shadow behind the button optically draws it off the screen, making the FAB a natural attention grabber. Their circular shape typically differs from other visible content, and UX research has shown that rounded corners are easier on the eyes.

button FAB

Example of a FAB

Icon Buttons

Icon buttons are often paired with labels to convey action. Icon buttons without labels are not recommended for audiences with low computer literacy, therefore a safe bet is to always pair icons with text in buttons.

buttons icon

Icon + label (left) versus icon button (right)

Last but not least, text links are signified with a color (often blue), underline, and/or specific actionable verbiage such as “follow us”, “read more”, etc.

These buttons can fall within as well as outside of a body of text and are typically for less important actions.

Button Sizing

Following MIT’s Touch Lab results on measuring finger surface area used to touch screens, a good rule of thumb (pun intended) is to have a minimum button size of 10mm x 10mm, or, 37px x 37px. At the smallest minimum requirement, buttons of this size have low touch accuracy.

On the flip side, buttons over 72px x 72px also have low touch accuracy, making the sweet spot for button size around 42px-72px on mobile.

When sizing buttons for desktop instead of mobile, the cursor is smaller than a finger, and often tricks designers into thinking they can create smaller buttons. Computer screens are much larger than tablet and mobile screens, and buttons can easily get lost on a page if too small.

A general rule to follow is padding the vertical height of your button with the line height of the font point size you’re using + 1 unit. If users with visual impairments increase the font size in their browsers, this will ensure that the button height will not be cut off with the increased font size.

Along with button sizing, it’s also important to consider the amount of space between buttons. Putting buttons too close together raises the risk of the user accidentally tapping the wrong button, but placing them too far apart may make the UI appear disjointed, and it may be difficult to quickly tap different buttons if need be.

Button Consistency

Consciously or not, users remember UI details. We associate certain element shapes with actions and buttons, like the floppy disc icon as a “save” button or a trash can icon to remove a file from your device. Consistent design not only improves overall design, it also creates a familiar and more seamless experience for users.

Since buttons are action points for the user, button text should also be actionable. Stick to using verbs (Complete, Start/Finish, Search)  or a simple verb + noun combination for buttons (Next Page, Submit Post, Learn More). Whichever labeling method you choose, maintain consistency across all of your buttons.

buttons wording

Verb + noun (left) versus verb (right)

When it comes to visuals, decide whether your button text will be all lower case, upper case, or title case. Consider color language: users may be confused by a red button that says “Save”.

Similarly, keep readability in mind when choosing colors. Users with visual impairments may have difficulty reading and engaging with buttons on your site, so try using this helpful tool to ensure your colors meet accessibility requirements. Check out our UX Checklist for Accessible Design Best Practices for more details.

buttons case

Lower case (left), upper case (center), title case (right)

buttons color

Color language in button design

Use buttons as an opportunity to showcase your brand colors.

Use a consistent button shape and size. Buttons can have a varying corner radius, but typically fall into one of three categories: hard line, rounded edges, or pill-shaped. Rounded corners typically communicate simplicity and openness whereas hard edges are more uniform and formal. Whichever style you choose, make all of your buttons the same shape to be consistent.

buttons cornerradius

Hard line (left), rounded edges (center), pill-shaped (right)

Next Steps

After reading this, don’t get too button happy. An overuse of action cues causes users to leave a site without engaging with anything. Buttons should be reserved for the small handful of important actions you want users to take. Make sure and check the buttons you have on your site against this guide to ensure they’re consistent and align with your visual brand identity.

Sign up for our newsletter for more posts like this – delivered straight to your inbox!

Data Sources to Take Your Campaigns to the Next Level

In the current climate of link building and digital PR, there’s one thing that’s nearly as important as the story you’re telling, and that’s data. 

When we think about how journalists and writers work in the industry today, they are squeezed tighter than ever. With a huge amount of redundancies from some major publications such as Buzzfeed, HuffPost and Elle in 2019, journalists are being assigned more and more publications, assignments and niches, and are therefore responsible for writing even more articles per day. 

According to BuzzStream’s latest research, journalists are often writing around one article per hour, and up to nine articles per day, with some extreme cases of 17 articles per day in the personal finance industry. Here are the stats from the ‘entertainment’ sector.

As PRs, this is putting us in a slightly different position. While there has been plenty of discussion around our jobs getting harder, the squeeze on journalists should make our lives easier, especially if we are doing our jobs correctly. Speaking very generally, journalists simply don’t have time to do in-depth research for an article or conduct primary data on a topic but we do. 

At AGY47, we have recently concluded that surveys aren’t for us. We have used them in the past with varying results, but find that it’s very difficult to capture data from audiences that represent either the population as a whole, or the demographics of some of our clients. 

Plus, we have had better results with data that we’ve manipulated or found ourselves. When you consider the time and cost of conducting a survey, it’s not worth the investment in most cases.

To secure coverage for clients using data, and to create excellent contacts and relationships with journalists and writers in the future, here are some solutions that you may not have come across already.

Trends and popularity

Using trends and popularity data takes us to the trendy tactic of newsjacking for PR. By using tools like Google Trends, which shows search popularity for a certain term at a certain time, and Exploding Topics, a tool that shows you upcoming trends, you can create stories.

For example, you can find out when something was most or least popular, and discover what the public are curious about, or tired of. 

During the 2019 series of Love Island in the UK, Twitter exploded with confusion after finding out Curtis’ favourite position in the bedroom, ‘the eagle’. We can use Google Trends to discover that it sparked curiosity in the British public on that day of broadcast, and also the following Sunday. This makes for a very quick tongue-in-cheek story that’s shareable and appealing to journalists.

This year, it was all about the butter churner, which we can see reached its peak on the day of broadcast of the episode. 

A story, which would potentially take less than an hour or so to put together, would appeal to the mass media, as they will all be writing about it. You’re just providing the data. 

Open data sets/ Public service data

There is a wealth of public data readily available for use in campaigns. The Office for National Statistics as well as Statista, and Google have a wealth of publicly available data

Some less popular but incredible sources of data are the likes of Google Finance, which allows you to see stock values for many companies. In the US, there’s and USAGov offering data on the nation’s people and economy. In the UK, and have a wealth of information on local authorities, public bodies, crime rates and stop and search information. 

Freedom of Information Requests are a time consuming but worthwhile way of getting primary data on a topic. You can submit very specific questions on a topic to councils, schools, colleges and universities, health trusts, hospitals, publicly owned companies, museums and the police. 

Along with the obvious ones, there are other public bodies in the UK, such as The Environment Agency, The Industrial Injuries Advisory Council, The Zoos Forum, and for very niche requests for data, The Human Tissue Authority.

Social media stats and tools

Journalists love to write stories about things that are ‘most liked’ and hated, but there’s a way to go one step further. Using Python, a programming language that is harnessed by many SEOs, you can scrape both the number of Tweets and the sentiment of these tweets around a certain topic. This helps you gauge the public’s perception of events, people, TV shows almost anything! Here’s a tutorial on the basics of sentiment analysis using Python.

Scraping sites

You can also scrape popular websites for data to turn into a story. For example you could scrape a popular review site to see the public’s favourite (or least favourite) film, song, dish, actor or artist over a certain period of time. 

Turn that idea around to find the volume of reviews, and create stories about future favourites, such as ‘upcoming’ holiday destinations. You could analyse hundreds of results and see which have the most dramatically and strongly opposing reviews, i.e. ‘The song that divided the nation’. 

Manipulating existing data

In the past, I’ve seen success from brands taking existing data, whether it’s their data or already out there online, using it in a story and getting great coverage. I don’t see anything wrong with this at all, as long as the original source is credited.

To make the findings more original, there are ways to manipulate existing data. For example, take the average time Brits take to commute to work per region, and the national average wage. 

You then have a story that can go regionally and nationally about how much extra we could earn if we were paid for our commutes. A story that is sure to create a reaction, especially for anyone reading the article on their way into the office!

I saw an example recently where it was proven with data that Americans’ musical tastes mirror their political divides.

Throw the research out of the window – create your own data!

I’m seeing more and more great campaigns where agencies are really going all-in and conducting their own experiments and using that data. 

Things like collecting germ swabs on tube lines to see which is the most germ-filled, and doing primary research on how easy it is to buy an individual’s online data. 

Each of the above methods are a great way to diversify your ways of getting data to turn into stories that journalists will love. 

If you are using interesting and new data to produce content that stands out and it still relates to your brand, that’s a winning combination and you’re likely to have success with your story.

The post Data Sources to Take Your Campaigns to the Next Level appeared first on BuzzStream.

A look at performance post Google’s average position sunset: Top vs side

Average position as a metric has been retired since the end of September. This is a big change since for years clients, agencies, and any advertiser has always had at least a little bit of vanity management. By that I mean, everyone at some point submitted a bid with the sole goal of being “number one” and not any actual business metric.

This change was implemented to acknowledge that the average position is not meaningful when you are in a world of personalized search. Stopping vanity bidding is just a beneficial side effect. I wanted to take a look at some data, specifically CPC and CTR, to see how performance varies for top and side positions. I also wanted to look at how these metrics vary on vs. Search partners. What I found were some very interesting insights that might impact how you think about your campaigns.

When it comes to the differences between Google and it’s partners and top vs. other the keys are:

  • Google top vs. other has the biggest differences when it comes to CTR. The data showed a >900% increase in CTR across desktop, mobile, and tablet. This was the highest delta across the entire data set, expect for Partner top vs. other which was nearly 4x the difference.
  • Mobile for Google vs. the Partners was also a significant difference at 918%. This was noticeable because the desktop variance was only 30% (basically a tie). The importance of mobile can’t be understated.

CTR differences after average position sunset

When it comes to cost per click differences the variances were really noticeable when it comes to cost per click. The drop off between Google and partners was at least 100% and as high as 268%. The differences are driven primarily by demand. Many advertisers do not participate in the partner network. Therefore, demand is down and the cost per click would fall as well. This is where if the conversion rates are right you would be able to pick up some additional scale. The difference when looking at Google and Partners top vs. other is a much smaller delta. This just highlights the demand point above. The difference in mobile was only 13%. There are such a high demand and fewer spaces for mobile that the difference between top and side was the smallest of any data set that was reviewed.

CPC differences after average position sunset

While the CPCs weren’t that different the CTRs for Google mobile top were significantly higher than the search partners top. I thought this was worth showing the actual data to show the differences between mobile and desktop. The drop in mobile top is very high indicating a different search experience and relevance. The differences are very small and much lower CTR when looking at the “Other” positions.

CTR actuals at other positions after average position sunset

What action should you take based on this data?

1. Don’t manage to these metrics – Optimize them

Ultimately, you shouldn’t really care what the CPC is or what your CTR is. The goal is hitting your KPIs. If you need to pay $100 per click, but convert 100% of the clicks then it’s no different than paying $20 per click and a 20% conversion rate. That’s not to say you shouldn’t optimize to improve, you should. I’m just suggesting that metrics like top vs. side CTR are simply indicators on how you can improve. These are not your true KPIs.

2. Understand the value the search partner network brings your campaign

The search network provides scale to your campaigns and to Google for a revenue stream. That doesn’t mean in every case you need or require that scale. If you are struggling to perform break down your traffic by Google and the partner network. Look at not only CTR and CPC data, but also understand conversion rates. What would happen if you cut off the search partner network to both your volume and your cost per acquisition? Does this additional scale provide your business value or would it be better spent investing in other areas that perform better? This isn’t a one size fits all answer. You need to do the work and the result might be different by campaign or even keyword.

Note: The stats and observations shared by the author have been derived from BrandMuscle’s anonymized client data.
Feel free to share your observations in the comments section.

The post A look at performance post Google’s average position sunset: Top vs side appeared first on Search Engine Watch.

Python – A practical introduction

Learning Python for SEO part #2

In part one of this “Learning Python for SEO” guide, we introduced some of core concepts of programming. In this part, we will get our hands dirty, and start to program proper python!

It’s worth a recap of part one before we start – a lot of the knowledge will come in handy. We will build on the definitions of variables, loops, expressing decisions, and the ability to define functions. discussed in part one. Python has similarities and differences from the pseudocode we discussed in part one. I hope you will find some conceptual similarities between the pseudocode introduced last time, and the Python programming language.

At this point, some guides will ask you to download Python. We are going to take a different approach.

Learning a new programming language can be a challenge, so we have tried to remove the uncessary hassle of installing Python, so you can focus on the most important part of programming – the language it’s self.

For this introduction you are encouraged to try an internet based solution to run Python code – meaning no software installation hassle.

Web based Python interpreters.

Python runs in many places. Python is available for Windows, Mac, Linux, can be found on the desktop and in the cloud. There is even a version of Python called micro python ( ) which is designed to be run on tiny embedded devices.

This huge range of installation options can add an overhead to online tutorials with beginners having to find the appropriate download and face install hassles. We didn’t want to give you that sort of negative experience.

For this session, you will be introduced to an alternative way of runnign Python – web based Python interpreters which can be used to run Python code via a web browser.

A few web based python interpreters exist – a couple we found while researching for this article are “” and “”. Both appear to work on a similar principle, albeit with a slightly different screen layout.

We’ll introduce both and below – have a read of both and then choose which platform suits your needs best. offer a number of languages, coupled with the ability to store and share code across a team. This power introduces a little complexity to jump over at first, though fortunately, much of the complexity can be avoided after these initial steps!

Once activated, provides a web screen broken down into 3 panels. If you choose to use to follow this tutorial, you’ll be using the middle and right hand windows. The middle window lets you enter short python programs, and the right hand window shows you what happens when they run.

You can start a Python Session by visiting and:

  1. Select “new repl”
  2. Choose Python
  3. Click Create new
  4. Bypass Repl setup

Select “new repl”

At the time of writing, The new “repl button” is in the top right hand side of the screen. There is no need to “Log In” or “Sign Up” to access a repl.

Choose Python

Next, “” offers the choice between creating a new Repl, or importing one. also presents a list of languages you can choose from. For this tutorial, choose “Python” from the “Create New Repl” tab.

We then confirm the creation of a new “Python” Repl using the green “Create Repl” button.

Bypass Repl setup then presents you with the ability to set up the name and a description for your session. Don’t worry about that now! For the purposes of this tutorial, you can bypass this menu by clicking the mouse outside of the menu pop-up.

And that’s it – you should now have access to your own online python interpreter!

You will need the more advanced features included in to complete this guide – however, if the steps above seem just a little technical – you may wish to start with something simpler.

OnlineGDB is a little more accessible than – to get started, all you need to do is visit the online python debugger page to begin:

Please note: If you choose this option, you may have to switch to to finish this tutorial, as supports some of the more complex features used later on.

OnlineGDB comes with an example “Hello World” program you can run using the “Run” button. You may also note that Online GDB does come with a few embedded adverts.

Moving from Pseudocode to Python code.

In part one of this guide – we focused on pseudo code – trying to communicate algorithms in a structured, consistent language of our choosing.

Programming languages are a lot like the pseudocode in part one – with one very important exception. In pseudocode, we express each step using a language of our choosing. If you want to program in Python, you have to follow the rules defined by Python. Programming languages specify rules for naming variables, functions, and offer a number of “commands” which are used to tell the computer what to do in each step of your program.

Last time, we looked at some pseudocode to ask for a users name, and to return a greeting:

Pseudocode to greet a user
Show Message “What is your name?”
name = Input
Show Message “Hello {name}” 

The python programming language is similar conceptually to the pseudocode above, but differs in implementation. Lets start by taking one step back from the code above, and instead looking at a simple example – a problem known as “Hello World”, and a common first program in many programming guides. The “Hello World” program prints the message “Hello World” to the screen. In Python, “Hello World” is expressed as follows:

print (“Hello World”)

Let’s break that short program down, and see what the structure and punctuation means:

There are three parts to this print command –

  1. The word print – a recognised python command.
  2. We then have open and close brackets which contain…
  3. The phrase "Hello world" – some charactors surrounded by speach marks.

It’s important to know that a lot of programming languages are case-sensitive. Case Sensitivity means that the programming language will consider Print and print as different things. Using Print when you mean print will result in an error message ( try it! ).

The phrase “Hello World” is known as a string – a sequence of text characters surrounded by quotes or speech marks ( depending on what you call the " character ). Within reason, we can change the contents of this string to "Hello Bob", "Hello Sue", or even "Good morning Mr President", with little or no impact on the rest of the program.

We can now use this knowledge, and an online Python interpreter like Online GDB or Repl. At this point, we need to introduce a little of the history of Python, as some online interpreters may use an older version of Python called Python 2. This course will be based on the modern version of Python called Python 3.

A note on Python versions.

Computer programming can be a tricky process, and it’s easy to fall into the trap that anyone who knows how to program well enough to write a computer programming language is a super human genius incapable of making mistake or oversight.

It may be re-assuring to know that people who write computer programming languages tend to be human, need to eat, poo and drink, and learn and develop like the rest of us. As writing programming languages is a skill, it may not surprise you to discover that people who write programming languages get better at their craft, finding new ways to do clever things and coming up improvements to make to the program languages they maintain better.

This progress tends to see new features added to a language. Sometimes, some programming languages evolve so much that they become a little inconsistent. This inconsistency can be frustrating and slow down the practice of programming. In turn, the powers that oversee the language may declare that a whole new version of the language is necessary that fixes the inconsistencies – potentially breaking old programs.

Breaking software isn’t something that’s generally considered to be a good idea. IF a programming language requires this level of overhaul, it tends to result in two versions of a programming language. The old version is needed to run old programs. Over time, it is hoped, the old one gets less popular, and more people start to use the new one, and gradually the new language becomes the way to do things.

Python 2 was a tremendously popular programming language, and has seen lots of updates – but some time ago, Python 3 was conceived – a language which would look and feel a lot like Python 2, but introduce a few breaking changes to make the language more consistent and more suitable for modern programming.

The switch has gone on for many years – with Python 3 finally becoming mainstream over it’s older variant. In this guide, we will ignore Python 2 and when we say Python, we will mean “Python 3”.

It’s worth noting that both Python 2 and Python 3 have seen a lot of development, with bug fixes and new features introduced to both languages. What we call Python 3 is actually a range of releases of Python from old ones like Python 3.0.1 to more recent ones like 3.8.1. If you are curious – more detail can be found on the python releases page and python history Wikipedia article.

Our first Python program.

We have already seen our first python program – “Hello World”. Let’s run it using one of the online python interpreters seen above!

If you have set up your session in, you can enter the Hello World program into the main window ( marked 1 on the image below )

After typing in the print(“Hello World”) program inot the main window, you can run the program using the green “run” button ( 2 ). If everything goes to plan, will see the message “Hello World” displayed in the right hand output window ( 3 ).

If you have decided to try OnlineGDB instead of, the “Hello World” program code is already entered. To run the “Hello World” program, just click on the green run icon in the top menu bar.

When the run button is clicked, the screen changes slightly, and a new panel appears at the bottom of the screen.

You should see the message “Hello World” inside this new panel, coupled with some technical messaging.

If you see the same “Hello World” message as the screenshots above – congratulations – your program works!

What if the program doesn’t work?

A lot of guides work on the basis that the above code works – which is great unless your program fails to run, and instead of a nice “Hello World” greeting, we instead get a message complaining that something is wrong. Even if your program ran first time, given the amount of time programmers spend “debugging” code, it can be worth putting some errors in deliberately to get a feel for what happens when things go wrong! Here are a few common ones you may wish to trying ( taken from ):

Case Sensitivity: Print("Hello World")

Traceback (most recent call last):
File "", line 1, in
Print("Hello World")
NameError: name 'Print' is not defined

You may see the error name 'Print' is not defined is produced if the command print is misspelt, or contains uppercase letters. Python is case-sensitive so if we want to print we should use the lower case print command.

Wrong Quotes: Print (“hello world”)

Traceback (most recent call last):
File "", line 1
Print (“hello world”)
SyntaxError: invalid character in identifier

This error is more subtle – the quotes that python ( and many other languages ) use are different to the quotes produced by Microsoft Word. If you cut and paste code into or from Word, this can introduce errors like the one shown above.

Missing Quotes: print (hello world)

File "", line 1
print (hello world)
SyntaxError: invalid syntax

Error messages are not the nicest of events at the best of times – especially when Python gets a little confused and reports a different error to the one you expect – in this case, pointing to the start of the word “world” as a suggested starting point. The issue we want to fix in this example are the missing quotes, but Python points elsewhere!

A varient on Missing Quotes: print (hello)

Traceback (most recent call last):
File "", line 1, in
print (hello)
NameError: name 'hello' is not defined

If the space is ommitted and quotes are missing you will see a slightly different error message. This is because the print command expects a variable called name to have been set up first. Python doesn’t check your code for all possible errors at the same time. Instead, Python priorises error reporting, and yells as soon as it see’s something wrong. This is why the message above in the first “Missing Quotes” example points to world. Python has prioritised checking for a different error, as it expects hello to be a valid, defined, variable. Python hasn’t checked the validity of the variable yet, as the presence of a different word in the print command which no sense to it what-so-ever.

Getting User Input

Let’s return to the greeting pseudocode we re-introduced from part one of this guide:

Show Message “What is your name?”
name = Input
Show Message “Hello {name}” 

You may already be able to adapt the Hello World program to display the first question above:

print("What is your name?")

The print command can be used to display more than just a “Hello World” string ( a message is called a “string” in programming terms ), so we can adapt it to ask the question instead. However – we can improve on our pseudocode, as Python has a clever input command which accepts a string parameter, and displays the string before taking user input.

You can represent thefirst two lines of the pseudocode above in the following single line of Python ( try to run it in your or session – you can either delete the existing code or add this on at the end ):

name = input("What is your name? ")

You may still see some similarity to the pseudocode – a variable called name is introduced, and the user is prompted with the message “What is your name?”. The input command will assign the value entered by the user into the name variable using the “assignment operator” – in programming terms, the equals sign: = .

The assignment operator works by trying to calculate what is on the right of it. After working this calculation out, it then tries to put the result of the calculation into the variable on the left of the assigment operator.

If you decided to enter the name = input("What is your name? ") program into your online interpretor, you may have noticed that not a great deal happend in order to print out the name. To do this, we need to introduce a twist on the print command which lets us put variables into strings:

print ("Hello {}".format(name))

If you put both lines of code into Repl or onlineGDB in the following order, you can try the program out, and, hopefully, be greeted on a more personal basis by your computer –

name = input("What is your name? ") 
print ("Hello {}".format(name))

We will return to an explanation of “Hello {}”.format(greeting) later in this article when we look at a new concept called methods. Before we look at methods, it may be beneficial to look at how we can define our own functions.


A feature we introduced in part one of the course was functions – a way of structuring programs better and potentially reducing the amount of code our programs need to achieve a task.

Because Functions are such a common language feature, Python makes them very easy to define:

def greet(greetee):
 print("Hello {}".format(greetee))


If you entering this code into your interpreter and run it, you should see the following in your output window:

Hello Bob
Hello Sue
Hello World

It’s worth noting that calling the greet function and passing parameters looks a lot like the print command. You may find it helpful to think of Python commands as inbuilt functions.

In order to create your own function, the def command is used, followed by the name you want to call the function ( in this case greet ). Your function can take one or more parameters, the names of which are listed in brackets:

def greet_chef(forename,surname):
 print("Hello Chef {} {}".format(forename,surname))


After the parameters for the function, there is a colon. The colon indicates the start of the function definition – the commands which will be called when your function is called.

In Python – the function definition is indented with either space or tabs. This is different to many other languages – could be considered an improvement, as programmers tend to indent code blocks like this anyway. Function definitions can contain many commands – to finish, you just stop indenting the code when you have finished your function definition. You can try a multi-line function by introducing a couple more lines to your greet function:

def greet(greetee):
 print("Hello {}".format(greetee))


If you run this program, you should see slightly more verbose content, with a leading and following line of dashes around each greeting.

Decisions ( The “IF” statement )

In programming, it is very common to try to control the flow of a program using a test to see if some condition has been met. There are a range of tests which can be applied – comparing numbers to see if they are equal, or if one is greater than the other, comparing strings to see if they are the same, or if one string contains another. You may want to compare dates to see if they correspond to the same day of the week.

Fundamentally, all these tests boil down to a simple true or false test.

If statements let the programmer perform potentially complex sets of operations, that reduce down to a true or false condition. If the condition is true, then the block of code following the if statement is executed. If the condition is false, then the block will not be executed.

Consider the following example code – what do you think will happen when it is run?

test = 7 if ( test > 6 ): print ("The test number ( {} ) is greater than 6".format(test))

Hopefully, you see confirmation that 7 is greater than 6! A default fallback is provided by using the else command in conjunction with the if statement, which you can try below:

test = 5 if ( test > 6 ): print ("test is greater than 6")
else: print ("test is not greater than 6")

It’s not just numbers that can be tested – you can also test strings for a number of different conditions. A common testing condition is to see if a value of a string matches some predetermined value:

test = "plant" if ( test == "fish" ): print ("test is a fish")
else: print ("test is not a fish")

It’s worth noting that the test to see if strings ( or numbers ) are the same is ==. You may be wondering why instead == of = ? This is because = has already been used as the assignment operator in Python.

Python provides you with a huge range of inbuilt tests which you can use on a variety of data types. So far, we have seen numbers and strings. There is also a different data type – a list, which gives you the ability to handle lists of strings in Python:

names = ["bob","sue","rita","world"]

A useful test that can be used on these lists is in to see if a list contains a particular entry – such as this security person simulator you can enter into your interpreter:

names = ["bob","sue","rita","world"] if ( "ralph" in names ): print ("ralph can come in")
else: print ("ralph cannot come in") if ( "bob" in names ): print ("bob can come in")
else: print ("bob cannot come in") 

There are many more cases in which you can use loops, and huge numbers of examples available in google. For now, though, let’s move onto the next topic – how to run a command many times.

Loops / Repetition

There are a few ways of expressing loops in Python – many look a little like a function definition – begining with the for command, and ending with a colon.

Typically, there will be some manner of variable in a loop that can change each time the loop is run. This variable can be used to test to see if the loop should stop running, or simply count up through a sequence of numbers.

A technique to count numbers is to use the range command to produce a range of numbers that are stepped though – though beware! There is a trap for the unwary. Running the following may not give you what you expect!

for counter in range(10): print(counter)

This produces:


Ten numbers are produced – zero through nine inclusive – but ten is not listed. This is because many computer programming languages treat sequences of numbers as starting at zero. This leads to the potentially odd situation where zero is the first item, one is the second, and so on.

If you want to count from one to ten, there are a couple of techniques which may be helpful – though the most straight forward is to just add one to the counter before you print it:

 for counter in range(10) :



The second type of loop is called a while loop, and continues until a variable reaches a certain condition. This sort of loop is great for testing user input – such as in the following code:

name = ""

while ( name != "Rumplestiltskin" ):
print("Guess my name, Guess my name!")
name = input()

print ("Well done, you guessed my name!")

If you copy and paste ( or type in ) the above code into your online interpreter, and run it, you should have a basic game, whereby the user must guess the name of some mystery charactor played by the computer. The game ends when the user types “Rumplestiltskin” or the “stop” button is pressed in the online Python interpreter. Try changing the name, or using a parameter for input instead of the seperate print statement above.

The game works because when the user guesses correctly, the loop exits, as the condition in the while statement becomes untrue. The interpretor then moves onto the next available line of code and displays the success message congratulating the user.

The format of these blocks of code that power if statements and for and while loops may look similar. This consistency helps a programmer adapt to a language and express problems clearly and quickly.

We have covered a great deal of material so far – including functions, loops, conditions and various tests we can apply to strings, numbers and even one for a list. Let’s have a quick recap before we move onto the explanation of "Hello {}".format("world") promised earlier.

Summary of commands and tests

Well done for making it this far! Lets pause to recap on some of the Python we have been introduced to before we continue:

  • print("Some Message") shows a message
  • var = input() captures user input and puts it into variable var
  • var = input("enter some input:") as above, but displays a message to the user
  • print("A {} is inserted into this message".format("string")) includes a variable in a message shown to the user.
  • if ( x > 6 ): If variable x is greater than 6, execute the block of code following the colon.
  • else: Follows an if statement.
  • posessions = ["house","car","shed"] a list containing three strings
  • for i in range(5): Executes the following code block 5 times, counting i from 0 to 4
  • while ( name != "Rumplestiltskin" ): Executes the code block which follows until the variable name contains the string “Rumplestiltskin”
  • name = "bob" assignement ( makes the variable name contain the string “bob” )
  • name == "bob" tests for equality ( tests to see if variable name contains the string “bob” )
  • "boat" in posessions tests for a presence of a string “boat” in the lists posessions

If you haven’t taken a breather or cup/glass of your beverage of choice, it may be worth doing so now, and scanning over the material above before we continue to look at methods. After looking at methods, We will finish of this post with some example code to set the scence for some content to come later in this series.

An introduction to methods

Earlier, when you wrote some code which included a value from the user in our output, you used a new form of function which we introduced as a method. We used the format method with a string to include user input in the messages shown on screen. Our code was in the form:"Hello {}".format("world") – which you can revisited by clearing down your online intepreter and re-entering the code below:

print( "Hello {}".format("world") ) 

Earlier, we introduced print as a function, but then said that format was a method – so what’s the difference between a function and a method? And why are two different ways of doing a task needed in a programming language?

A way of looking at the difference between methods and functions is to think of a method as a special type of function that acts on something. In this case – the format method is called on a string – "Hello {}". format( ... ). The dot between "Hello {}" and format ( ... ) is the symbol in Python that means “call the following method on this thing”.

When the Hello {}".format("world") code is run, the computer will call the format method on the "Hello {}" string before it does what is needed to perform the print function. So in this case, the format method reads through the first string, and produces a new string containing the old string, with the curly braces {} replaced with the argument passed into format. This new string is passed into the print() function, and we get our nicely formatted output.

It’s worth trying to ignore the format method call, and just print the initial string containing the curly braces – like this: print( "Hello {}" ) – the functionality provided by the format method is not present – so your print statement will just does it’s core function – printing. If you try it then you should see a message like the following:

 Hello {} 

It’s important to note that for the most part – the methods you call on things are very context dependent. You can call format on strings, but will run into difficulty if you try to call format on a thing that doesn’t have a format method available – like a number. You can test this by trying some deliberately bad code like print (12.format("world")) – which produces the following error when run in

File "", line 1
print (12.format("world"))
SyntaxError: invalid syntax

There are other methods available for things that are Strings which you can try using print:

print("I AM NOT SHOUTING".swapcase())
print("this is shouting".swapcase())
print("This Is All Uppercase".upper())
print("This Is All Lowercase".lower())
print("This Just Swaps Upper & Lowercase Charactors".swapcase())
print(" this has no padding ".strip())
print("---this has no dashes padding it---".strip("-"))
print("---neither - does - this ---".strip("-"))
print("i want this to be a title".title())
print("...NOt WHackY TyPiNG...".strip(".").lower().capitalize())

If you copy and paste the whole block, you should be rewarded with a demo of a number of methods available for things that are strings:

i am not shouting
this is all lowercase
this has no padding
this has no dashes padding it
neither - does - this
I Want This To Be A Title
Not whacky typing

Most of the examples above follow a simple pattern – a method is called on a string. Some methods have taken a parameter – others have not.

The last example “Not whacky typing” is a little more complex than the others. This example chains together methods. Method chaining is a popular programming technique because it leads to shorter code. However – it is full of traps for the unwary.

The “Not whacky typing” example only works because each of the carefully chosen methods returns a string. Because a string is returned, we are able to call another string method using the dot notation. It is only because our string methods return strings that we are able to string together a sequece of string methods.

Not all methods return strings – and that applies to methods you can call on strings too – lets have a look at a different method that returns a number:

print ("We should ban bendy bananas!".count("ban"))

This should print 2. If we try to chain a string method to this then the code will generate an error – because count() returns a number, and upper() is a method that applies to strings rather than numbers:

print ("We should ban bendy bananas!".count("ban").upper())

Traceback (most recent call last): File "", line 2, in print ("We should ban bendy bananas!".count("ban").upper())
AttributeError: 'int' object has no attribute 'upper'

So many methods – Don’t Panic!

One important note on methods – the important take home here is concept of a method – not the range of methods available. Please – pretty please, don’t feel you need to learn these methods. Programmers tend to learn the methods they use most almost by accident due to frequency of use. For less memorable methods – developers tend to use a search engine like Google/Bing or instead search on a dedicated technical Q&A site like StackOverflow. There is, of course, also online documentation and a range of books to choose from including the Python cookbook by David Beazely and Brian K. Jones .

Building up to more real code.

We’ve now looked at many of the fundamental building blocks of code introduced in part one of this series, and gone further to explore methods. Before we close – let’s finish up with a slightly more complex example – parsing a web page to find some key features.

While many of the examples above run in both OnlineGDB and – we will use the more complex features supported by for this example.

Rather than generating unnecessary web traffic for the purpose of a demo – we can start this example with a “heredoc” – a way of populating a string with more complex data than can easily fit inside quotes.

It’s very easy to create a heredoc in Python – just use three quotes next to eachother rather than one, as can be seen in the following code which puts a small html page into the html variable and then prints it out.

html = """<html>
<title>This is a webpage</title>
<h1>A header</h1>
<p>Some Text</p>
<h2>first level two header</h2>
<p>another paragraph this one containing a link to <a href="">google</a></p>
<h2>second level two header</h2>
<h2>third level two header</h2>
<p>a footer containing a link to <a href=""></a></p></body></html>""" print(html)

Running this code should print out the raw HTML sourcecode for our sample page. By using """ and """, rather than " and " to wrap our string, we get to use multiple lines of data and include quotes.

Now we have a webpage in the computer memory, we need a way to process it. One idea could be to write some code to understand HTML and pull out some features. But – we don’t need to do such unecessary hard work.

One of the huge benefits of modern programming languages like Python is the huge open source community. In a delightfully de-centralised way, members of the community have created a plethora of software building blocks. These can be re-used to build new programs ( within licensed terms ). Re-usable code in this form tend to be called packages, libraries or modules. There are some subtle differences between packages and modules which are out of the scope for this series, but the terms are sometimes used interchangably.

One of the many Python packages out there to process HTML is BeautifulSoup4. It should be noted that the author makes a plea for ethical use of the software. BeautifulSoup4 is the latest version of beautiful soup, and is available with commercial support from TideLift. BeautifulSoup4 can be imported into using the inbuilt package manager as follows:

First – select the package manager ( box icon ) from the left hand menu bar[1]. Then enter “beautifulsoup4” into the package search[2].

We need to select “beautifulsoup4 Screen-scraping library” – the above version is 4.8.2 – which is correct at time of typing. The version number may have moved on since.

We then click the green plus button to confirm we wish to Add the Package to our project. This will yield some text along the lines of the following in the output window: Updating package configuration --> /usr/local/bin/python3 -m poetry add beautifulsoup4 Using version ^4.8 for beautifulsoup4 Updating dependencies Resolving dependencies… Writing lock file Package operations: 2 installs, 0 updates, 0 removals Installing soupsieve (2.0) Installing beautifulsoup4 (4.8.2) 

We can now look at using BeautifulSoup to examine our test html page.

Because BeautifulSoup is a third party package rather than a standard part of Python, we need to explicitally tell our program that we want to use it. The package manager has a different role to helping our program tell Python what libraries it needs. Python has a command called import that lets us tell Python we want to use the library. Fortunately, the libraries documentation tends to tell us how to import the features we need. In the case of the documentation for BeautifulSoup, they suggest the following to import the module:

from bs4 import BeautifulSoup soup = BeautifulSoup(html, 'html.parser')

This code tells python we want to use the BeautifulSoup module and then proceeds to create a usable “soup” object from our html. An object is a thing which you can call methods on – a little like our string examples above.

You may have noticed the presence of single quotes rather than double quotes in the example above, surrounding html.parser. Python lets you use single or double quotes pretty much interchangably – as long as you open and close with the same quote charater. This feature can be really handy when you want to make a string that contains a quote charactor – such as " this contains a single quote -> ' <- here " or " this contains a double quote -> ' <- here ". You may find that some programmers prefer one form of quote over the other – which can lead to some examples of code using single quotes and others using double.

BeautifulSoup objects have a huge range of methods available. For the purpose of this introduction – let’s have a look at extracting a small number of basic features from our html page –

  • The page title,
  • The target and anchor text of any links on the page,
  • and H2 tags.

The documentation can be pretty daunting for first time readers, but it contains detail of the methods we can call on a “soup thing” to get the data above. We also need to introduce a new concept – attributes. I don’t want to add too much complexity, so for now – lets brush over any formal definition. It should be sufficient to think of attributes as similar-ish to methods which return a value – but have no parameters and do not have brackets following them.

  • Get the page title: soup.title.string ( this is an attribute )
  • Find all links: links = soup.find_all("a") ( find_all is a method. “a” is the html tag for a link. This code therefore returns a list of anchor html tags )
  • Find all H2 tags: headers = soup.find_all("h2") ( as above but with “h2” tags )

Python makes processing lists of things in loops really easy, which means we can use some similar code to the loops we looked at above to process each link in the list of links produced by the code links = soup.find_all("a") above:

for link in soup.find_all("a"): # process each link

The documentation suggests that we can get the target of a given link tag using link.get("href"). The anchor text is effectively the contents of the link tag – and can be extracted using a similar technique to getting the contents of the title tag shown above – link.string.

for link in soup.find_all("a"): print("Target: {}",format(link.get('href'))) print("Anchor: {}",format(link.string))

Having looked at all the elments, we can put all the code together and try to run it in our session:

from bs4 import BeautifulSoup html = """<html>
<title>This is a webpage</title>
<h1>A header</h1>
<p>Some Text</p>
<h2>first level two header</h2>
<p>another paragraph this one containing a link to <a href="">google</a></p>
<h2>second level two header</h2>
<h2>third level two header</h2>
<p>a footer containing a link to <a href=""></a></p></body></html>""" soup = BeautifulSoup(html, 'html.parser') # We have commented out the next line so it will not be run.
# print(html) print ("The title of the page is '{}'".format( soup.title.string )) print ("Links on this page:")
for link in soup.find_all('a'): print("Target: {}",format(link.get('href'))) print("Anchor: {}",format(link.string)) print ("H2 tags on this page:") for header in soup.find_all('h2'): print(header.string) 

Assuming you’ve succesfully used the package manager to include beautifulsoup4, the program should output the following:

The title of the page is 'This is a webpage'
Links on this page:
Anchor: google
H2 tags on this page:
first level two header
second level two header
third level two header

Success! We have gone from “Hello World” to processing a basic html file in one session – if you have got this far – congratulations, and welcome to programming!

Wrapping up ( for now )

I hope you’ve enjoyed a pretty substantial practical session to balance the theory of the first part of the “Learn Python for SEO” series.

We introduced and . You’ve seen how online Python interpreters can help us get coding without having to install software on our own PCs.

Building on the first article in this series, we looked at Python equivalents for some of the fundamental building blocks of programming languages. We’ve also introduced a few tests we can perform on variables to control the flow of our programs.

You’ve seen how we can define functions and loops to help us keep our code tidy and perform repetitive tasks.

We then looked into methods which are one of the fundamental constructs of Object Orientated programming .

We’ve wrapped up the session by introducing third party packages – and introduced BeautifulSoup. You should now have code which processes a web page to extract key features.

Steve Pitchford

Steve Pitchford

Steve has a been in tech since the late 90’s, learning the ropes with a UK e-retailer through much of the first dotcom boom after developing a passion for the web during his BSc in Computer Science.

Steve has been engaged with the Birmingham tech scene for years, co-organising the grassroots open-source conference YAPC:: Europe 2008, and founding the West Midlands Java User Group in 2014.

Steve Pitchford

Latest posts by Steve Pitchford (see all)

UX Checklist Series: Accessible Design

A few months ago, I found myself in a full leg brace following knee surgery. Everyday things I took for granted (like sitting in a chair!) suddenly became very challenging.

There are a handful of particularly stressful moments I remember well, but the moments I remember most are all the small gestures people did to help me—from the receptionist at my doctor’s office who brought out a little footstool so I could comfortably sit down, to the bus driver who pulled up *seamlessly* to a high curb so I could step off with ease—those people made choices, and those choices helped me.

As designers, we have the power to make choices that make our digital experiences better for everyone. When we make accessible design choices, our designs not only become more usable for those with disabilities but more usable for everyone.

What is Accessible Design?

Accessible design means designing to meet the needs of people with disabilities. It’s design that’s inclusive of all users, including users who have physical or cognitive disabilities that are permanent or temporary.

How might a person who experiences color blindness interact with your design differently than a user who experiences hearing loss? Or low vision? What about physical disabilities? Dyslexia? Mobility impairments? Blindness? Users interacting through screen readers or keyboard-only navigation?

Who else’s needs are excluded from the traditional design process? Accessible design takes all of these experiences into consideration, and proactively provides design solutions that are usable for everyone.

What’s the Difference Between Universal Design and Accessible Design?

Universal design, inclusive design, and accessible design are often used interchangeably; so what’s the difference? While these terms all have roots in increasing usability for a wider set of users, there are a few slight nuances to their definitions:

  • Universal design is the broadest of the bunch. This refers to designing for everyone in a way that’s the most usable as possible. A commonly used example of universal design is the creation of the sidewalk ramp because it increases usability for everyone crossing a street, not just those in wheelchairs.
  • Inclusive design is very much related but considers the full range of human diversity. Inclusive design challenges us to consider our own biases and look at who’s being excluded. An example of inclusive design would be providing options for both common and custom responses when asking for gender information on a form.
  • Accessible design is specifically designing for those experiencing disabilities, yet it often results in a better user experience for everyone. Accessible design meets the needs of those with permanent or temporary disabilities, but will often meet the needs of those with situational limitations. For example, closed captions provide a better experience for people with hearing loss, yet they also come in handy for those quietly watching a movie with a sleeping baby in the next room.

Designing for Accessibility and Inclusion

As UX designers, it’s our role to think about how different users with different needs might interact with our designs. We may think we’re considering a large majority of the population while we design, but we’re often overlooking the one in four adults experiencing disabilities. That’s 25% of the population, which grows to around 40% for adults 65 or older.

As public awareness for accessibility increases, it’s important we start actively thinking beyond our own biases and abilities while we design. Besides just being on the wrong side of morality and ethics, ignoring accessibility in design can negatively affect your brand’s reputation, and even lead to expensive lawsuits and legal battles. Not to mention, it makes it really hard (if not impossible) for 25% of your customers to use your product or service.

The following checklist walks through a list of design tips to help you get started. While this does not (and should not) replace a full accessibility audit, it can be used for some quick wins to make your designs a bit more inclusive.

When we design for accessibility, we improve the experience for everyone.

UX Accessibility Checklist & Guidelines


  • Text Color & Contrast: Use a contrast checker, such as WebAIM’s online tool, to ensure the color of your text is readable against the background color. The smaller your text, the higher the contrast needs to be for the color combination to pass accessibility standards. In my experience, color contrast is a pretty common accessibility offender and can be a great way to introduce accessibility best practices to your clients.

Accessibility 01 Color Contrast

  • Messaging: Don’t rely solely on color to convey a message. Consider using color, shape, and text to further emphasize your message. For example, try including iconography with your error messaging when visually communicating form field errors, rather than just color alone.
  • Links: Link colors should be visually different from your body text. However, similar to the above, don’t rely on color alone to style your links. Jakob’s Law also tells us that people like design patterns that are familiar to them. Underlining your links improves general usability by using a familiar design pattern, but also improves accessibility for users with low vision or color blindness.


  • Text Size: Make sure your text is large enough for people to read without straining or squinting. According to Smashing Magazine, 16-pixels (or larger) is the size you want your body copy. Secondary or tertiary text can be smaller, but keep your main content large and readable.
  • Enlargeable Text: Let people adjust and increase the text size themselves. This goes for important icons as well! If your button has a “download” icon, but that icon doesn’t increase in size with your button label, people may miss important context.
  • Clarity: Your page titles should be clear, descriptive, and to the point. Additionally, use the active voice and be direct in your communication to lighten the cognitive load on your users. For example, “Denise wrote a blog” is open to less interpretation than, “A blog was written.”
  • Scannability: Use bullets whenever possible to organize your text into smaller, digestible chunks. Avoid large and overwhelming walls of text by breaking up longer content sections into smaller paragraphs with descriptive subheaders to help increase scannability.
  • Structure: Use HTML and heading tags (H1, H2, H3, etc.) to establish a page structure that makes sense to screen readers. Fun fact: a clear page structure will also make more sense to search engines. So besides improving the experience for your users, a solid structure can also have a positive effect on your technical SEO!

Accessibility 02 Header Levels

  • Alignment & Length: Left-aligning your text can help improve the readability for people with cognitive disabilities. Avoid centering or left-aligning your text, especially when your text block wraps onto multiple lines. Speaking of wrapping, line length is also important to consider. Baymard Institute recommends 50-60 characters per line (including spaces!). Lines that are too wide are hard to follow, while lines that are too short can cause fatigue and stress your reader out.


  • Breadcrumbs: Breadcrumbs can be used as important navigational tools. Adding breadcrumbs can provide much-needed context and help orient your users.
  • Keyboard Navigation: Make sure your page is accessible by screen readers and can be navigated by speech or keyboard-only.
  • Focus Indicators: Taking that one step further, people using their keyboard to navigate rely on focus outlines on buttons, links, and other elements to know where they are on the page. You can add some styling to your focus indicator to align with your design styles, but NEVER remove these!

Accessibility 03 Focus Indicator

  • Link descriptions: Links are are typically navigational, so your link text should be descriptive and explain where the link will take you. For example, “Read more about accessible design” is more helpful than, “Read more.”
  • Button labels: Similar to text links, your button labels should set proper expectations by describing the action your button will trigger. “Contact our team” primes us for what we can expect better than, “Click here.”
  • Spacing: Anything that can be tapped or clicked should have plenty of space around it. Don’t demand precision or cram buttons closely together. It’s no fun (for anyone) to try to click a tiny link next to three other tiny links with accuracy. For mobile, we try to stick to a minimum tap target of 44 x 44-pixels as a rule of thumb for anything that can be tapped.
  • Form Labels: To help reduce cognitive load on your forms, make sure your form field labels are clear, descriptive, and always visible. Your field labels should never be replaced by placeholder text, or disappear when the user starts typing.

Accessibility 04 Form Headers

Images & Video

  • Alt Descriptions: Always add descriptive alt tags to your images, video, and other media. Remember, not everyone will be able to see your images so try to make your descriptions as detailed as possible. In addition to improving accessibility, alt tags have important SEO benefits as well.
  • Communication: Use imagery to support your text, but never use imagery in place of text. Images are great to support complex or complicated concepts, but those concepts should always be described in plain text.
  • Video Transcripts: Videos are awesome and engaging forms of media content, but don’t bury important concepts in your videos. If you are using video, make sure you include subtitles or video transcripts for users unable to watch.
  • Clarity: Icons are great for scannability, but not all icons are intuitive. For additional clarity, pair your icons with descriptive labels.
  • Overlays: Similar to color accessibility, text on top of images can be problematic as far as readability. If you choose to layer text on your images, consider adding a color overlay that helps your text meet color contrast standards with the background.

When it Comes to Accessible Design, We Practice What We Preach

While putting this checklist together, we did a quick accessibility audit on our own site. And as you may have noticed, there are some issues right on our very own homepage:

Accessibility 05 Seer Issues

As with any project, design and development updates require time and resources. You’ll need buy-in from your leadership, but it doesn’t have to feel like an uphill battle. Here are the steps we plan to take to address our own accessibility issues:

  1. Identify the problem: Use a checklist like the one above audit your site and document your known issues. Doing this can help you understand the level of effort needed to fix the issues.
  2. Educate through Empathy: Advocate for accessibility and explain why this matters to your team! Build empathy for your users with the necessary stakeholders. Fortunately for us, empathy is already at the heart of Seer’s values.
  3. Log issues and treat them like bugs: How would your team go about addressing other bugs on your website? Accessibility issues are usability bugs at their very core. People can’t read your button labels? That’s a critical usability issue! Treat it like one and prioritize accordingly.
  4. Create a plan for on-going optimizations: Websites are living things with many moving parts, and scheduling periodic accessibility audits can help you keep tabs on any new issues. Better yet, as awareness for accessibility grows on your team, use that momentum to make accessibility a part of your design process from the very start.

Note: The information provided in this blog post does not, and is not intended to, constitute legal advice with respect to ADA-compliance or otherwise, and should not be acted upon as such.

Looking for more UX Design Tips? Check out more posts from our UX Design Checklist series.

For more UX best practices and digital marketing tips and tricks, make sure to subscribe to our newsletter!

Display and search advertising: Top three strategies to expand your audience across channels

Omnichannel advertising can be complicated. Digital marketers today have an unlimited number of tools at their disposal to get their message in front of the right audience through search advertising and others. While your channels or tactics may change, the goal of all marketers remains the same – to grow your brand and build your business.

But how do you know which channel or channels to use to achieve these goals? Many marketers with smaller advertising budgets start with paid search as the first channel to target, because of the simplicity of setting up a PPC campaign in Google Ads. There are no creative assets or media buyer required, and no fancy technology to learn or understand. Search also has advanced targeting abilities, offering companies the chance to get in front of in-market shoppers the minute they start their search. And the results of search campaigns are quantifiable, with insights into exactly which terms are resonating most.

Programmatic display advertising, on the other hand, can be a bit more difficult for some marketers to get started with. This channel has traditionally been considered best for brand awareness campaigns, as display ads can appear virtually anywhere your potential customers are online. Taking advantage of display requires either a direct relationship with a demand-side platform, or DSP, or a relationship with an agency to manage the campaigns on your behalf.

But choosing the right mix of channels for your advertising campaign doesn’t need to be an all or nothing affair. In fact, combining display and search together can have a positive impact on your return on ad spend (ROAS).

Here are three strategies to effectively combine search and display advertising for maximum results:

1. Cast a wide net

If you’re looking to find more new customers and don’t have a ton of traffic on your existing site or searching for keywords you’re targeting with search, the first step is getting more site visitors. This is where programmatic display advertising comes in handy — it offers a scale that paid search campaigns can’t, at a better price point. If you have a big promotion coming up in a few months, it’s a good idea to increase spending on brand awareness tactics well in advance, in order to have larger retargeting and lookalike pools ready to go when your promotion is ready to launch. So start by casting a wide net with display, and then continue to adjust and refine your targeting parameters as time goes by to optimize performance and find your next best customer.

2. Retargeting

Once you have brought all these new visitors to your site, it’s time to introduce cross-platform retargeting. For example, if you are running a paid search campaign for sneakers and roughly only 13% of this paid search traffic becomes a paying customer, that leaves another 87% of the audience you already paid for who abandoned the site without ever converting. Now that they have already visited your site, you can use retargeting to show them a new series of messages in the hopes of bringing them back to continue further down the sales funnel. Your specific retargeting tactics can be simple or sophisticated, but the bottom line is that they will help keep the conversation going with the visitors most likely to convert down the road.

3. Contextual targeting

If you have already identified your best-performing keywords from your search campaigns, you can use this same keyword list to add contextual targeting to your programmatic campaign. While this strategy doesn’t directly link the two channels, it does allow you to further refine your audience targets. For example, if “athletic shoes” is something that a lot of people are searching for and is driving people to your site, you could create an “athletic” contextual segment to target with display advertising.

Each of these tactics are a great way to build awareness for your brand and products right when your prospects are actively shopping, and a great way to complement ongoing search activity. If you already rely heavily on paid search for a large part of your advertising, consider adding display, along with some targeting strategies to increase the efficiency of your campaigns and decrease your cost per acquisition.

Jason Wulfsohn is Co-Founder and COO of AUDIENCEX, a programmatic advertising and trading desk.

The post Display and search advertising: Top three strategies to expand your audience across channels appeared first on Search Engine Watch.

Readability: Dumbing down or opening up?

Writing a readable text can be daunting. Especially if the topic of your blog is difficult or extremely technical. Is it really necessary to focus on readability if your audience is used to your jargon? Well, although your audience might be up to the task of reading your lingo, the entire purpose of SEO is to attract traffic beyond the audience you already reach. If you aim for the top positions in the search engines, you should have texts that are readable and understandable for a large audience. This doesn’t mean you’re dumbing down your copy. Here, I explain why, and how you should make sure your text is readable.

Writing a readable text is hard

We do feel your pain. We understand you chase those green readability bullets and that can be hard if you’re writing for an advanced audience. Sometimes, people ventilate their frustrations on twitter. One of our users tweeted: ‘My blog posts are written for grownups and I write at the college level. Sorry, but I don’t know how to dumb myself down.’

We get that it might feel like you need to dumb yourself down in order to get the readability bullets green. However, you could also try to think of it as opening your content up to an audience you’ve not yet reached. And that’s the goal of any SEO-strategy: getting that traffic to your website!

Why should I care about readability?

Readability is important for your user. Reading from a screen is hard and people get distracted quickly. But, most importantly, you want people to understand what you’re writing. You want to get your message across. Nobody likes to read something that’s incomprehensible, boring or stuffed with keywords. If you write a text that people don’t understand, you won’t help people find what they need. 

Moreover, readability is also important for Google. Of course, if your text is better for the user, it will rank better, as Google optimizes for that same user. And, it is very important to realize here that Google’s algorithm is trying to mimic humans. It tries to read texts the way humans read texts. As Google becomes more capable of understanding and scanning texts in a human-like way, the demands on the readability of text also rise. Google will have a hard time reading sentences that are very long or that have complicated grammatical structures. For these texts, it will be harder for Google to figure out what they’re about. And this will result in lower rankings as well.

Read more about the importance of readability in our blog post ‘Does readability rank?’

Is ‘dumbing down’ really necessary?

Some niches require lingo. For technical blogs, you’ll probably use difficult, technical terms. You cannot avoid that. Nevertheless, that does not mean that such a text can’t comply with our readability analysis. In a previous life, I wrote a PhD-thesis called ‘The intergenerational transmission of criminal convictions over the life course.’ This was a hard topic. It involved many technical terms, cryptical hypotheses and boring analyses. However, the introduction of my PhD-thesis complies with the Yoast readability analysis (I did not enter the entire thesis as it contains a lot of tables and references). I needed to add subheadings and white spaces between paragraphs, because that is not particularly common in the field of research I did my PhD in.

Without wanting to brag: I have a green bullet for readability on all the blog posts I write. However, I often fail to comply with at least one of the checks. For this blog post, I had a hard time complying with passive voice (but still got a green bullet in the end). In other cases, I got orange bullets for transition words.

The readability checks for this post

It’s important to realize that one red bullet is not really a problem, yet. You should focus on getting your overall bullet green. If your sentences are a little bit too long, but you compensate that with short paragraphs, your text will be a good read overall. The following tips will help you improve the readability of texts with complex topics.

The overall score in the Yoast SEO content analysis
If your ‘overall’ readability bullet is green, your post’s readability is usually well-suited for a large audience!

Tips on opening up your writing style

What to do if you’re failing our readability analysis and writing about a complicated topic? First of all, I would recommend you shorten your sentences. You should probably not avoid the technical lingo you’re using, but you can try writing about complicated matters in short sentences. Usually, when a sentence is rather lengthy, you’ve created a combined sentence. Such sentences can be easily split into two (or three even). Our readability analysis lets you highlight your lengthy sentences. That makes it pretty easy to find and shorten them.

The second thing you can do if you’re writing about something complicated is to pay attention to your paragraphs. Start a paragraph with the most important sentence, then explain or elaborate on that sentence. This helps a reader to grasp the concept of your article, just by reading the first sentence of each paragraph. Make sure your paragraphs aren’t too long either (7 or 8 sentences is quite long enough). And, add a subheading that tells the reader what to expect in that paragraph. That will help your reader to grasp the meaning of your text much more easily.

A final tip on how to quickly improve readability is to use transition words. You can make your writing much more readable by using proper transition words like ‘most important’ and ‘because’. The Yoast readability analysis allows you to check your use of transition words. If you use too few, you can add extra transition words in pieces of your text where you have very few. Using transition words is a bit like putting cement between your sentences. The relationship between two sentences becomes apparent through the use of transition words. Readers will understand your content much better if you use these kinds of words properly.

Conclusion: open up to a large audience!

The goal of SEO is to attract new visitors to your website. You want to rank high in Google in order to get people to click on your results. And you want those visitors to stay and read your post. No matter how difficult the topic you’re writing about, if you care about SEO, you should try to make your text readable. Your users and Google will reward you for it!

Read more: “Yoast SEO hates my writing style!” – Common misconceptions about the Yoast plugin »

The post Readability: Dumbing down or opening up? appeared first on Yoast.