Dynamic Rendering with Rendertron

Many frontend frameworks rely on JavaScript to show content. This can mean Google might take some time to index your content or update the indexed content. 
A workaround we discussed at Google I/O this year is dynamic rendering. There are many ways to implement this. This blog post shows an example implementation of dynamic rendering using Rendertron, which is an open source solution based on headless Chromium.

Which sites should consider dynamic rendering?

Not all search engines or social media bots visiting your website can run JavaScript. Googlebot might take time to run your JavaScript and has some limitations, for example. 
Dynamic rendering is useful for content that changes often and needs JavaScript to display.
Your site’s user experience (especially the time to first meaningful paint) may benefit from considering hybrid rendering (for example, Angular Universal).

How does dynamic rendering work?

Dynamic rendering means switching between client-side rendered and pre-rendered content for specific user agents.
You will need a renderer to execute the JavaScript and produce static HTML. Rendertron is an open source project that uses headless Chromium to render. Single Page Apps often load data in the background or defer work to render their content. Rendertron has mechanisms to determine when a website has completed rendering. It waits until all network requests have finished and there is no outstanding work.
This post covers:
  1. Take a look at a sample web app
  2. Set up a small express.js server to serve the web app
  3. Install and configure Rendertron as a middleware for dynamic rendering

The sample web app

The “kitten corner” web app uses JavaScript to load a variety of cat images from an API and displays them in a grid.
Cute cat images in a grid and a button to show more – this web app truly has it all!
Here is the JavaScript:


  
const apiUrl = ‘https://api.thecatapi.com/v1/images/search?limit=50’;

  const tpl = document.querySelector(‘template’).content;
  const container = document.querySelector(‘ul’);

  function init () {
    fetch(apiUrl)
    .then(response => response.json())
    .then(cats => {
      container.innerHTML = ;
      cats
        .map(cat => {
          const li = document.importNode(tpl, true);
          li.querySelector(‘img’).src = cat.url;
          return li;
        }).forEach(li => container.appendChild(li));
    })
  }

  init();

  document.querySelector(‘button’).addEventListener(‘click’, init);
The web app uses modern JavaScript (ES6), which isn’t supported in Googlebot yet. We can use the mobile-friendly test to check if Googlebot can see the content:
The mobile-friendly test shows that the page is mobile-friendly, but the screenshot is missing all the cats! The headline and button appear but none of the cat pictures are there.
While this problem is simple to fix, it’s a good exercise to learn how to setup dynamic rendering. Dynamic rendering will allow Googlebot to see the cat pictures without changes to the web app code.

Set up the server

To serve the web application, let’s use express, a node.js library, to build web servers.
The server code looks like this (find the full project source code here):

const express = require(‘express’);

const app = express();

const DIST_FOLDER = process.cwd() + ‘/docs’;
const PORT = process.env.PORT || 8080;

// Serve static assets (images, css, etc.)
app.get(‘*.*’, express.static(DIST_FOLDER));

// Point all other URLs to index.html for our single page app
app.get(‘*’, (req, res) => {
 res.sendFile(DIST_FOLDER + ‘/index.html’);
});

// Start Express Server
app.listen(PORT, () => {
 console.log(`Node Express server listening on http://localhost:${PORT} from ${DIST_FOLDER}`);
});

You can try the live example here – you should see a bunch of cat pictures, if you are using a modern browser. To run the project from your computer, you need node.js to run the following commands:
npm install –save express rendertron-middleware node server.js
Then point your browser to http://localhost:8080. Now it’s time to set up dynamic rendering.

Deploy a Rendertron instance

Rendertron runs a server that takes a URL and returns static HTML for the URL by using headless Chromium. We’ll follow the recommendation from the Rendertron project and use Google Cloud Platform.

The form to create a new Google Cloud Platform project.
Please note that you can get started with the free usage tier, using this setup in production may incur costs according to the Google Cloud Platform pricing.
  1. Create a new project in the Google Cloud console. Take note of the “Project ID” below the input field.

  2. Clone the Rendertron repository from GitHub with:

    git clone https://github.com/GoogleChrome/rendertron.git 

    cd rendertron 

  3. Run the following commands to install dependencies and build Rendertron on your computer:

    npm install && npm run build

  4. Enable Rendertron’s cache by creating a new file called config.json in the rendertron directory with the following content:

    { “datastoreCache”: true }

  5. Run the following command from the rendertron directory. Substitute YOUR_PROJECT_ID with your project ID from step 1.

    gcloud app deploy app.yaml –project YOUR_PROJECT_ID

  6. Select a region of your choice and confirm the deployment. Wait for it to finish.

  7. Enter the URL YOUR_PROJECT_ID.appspot.com (substitute YOUR_PROJECT_ID for your actual project ID from step 1 in your browser. You should see Rendertron’s interface with an input field and a few buttons.

Rendertron’s UI after deploying to Google Cloud Platform
When you see the Rendertron web interface, you have successfully deployed your own Rendertron instance. Take note of your project’s URL (YOUR_PROJECT_ID.appspot.com) as you will need it in the next part of the process.

Add Rendertron to the server

The web server is using express.js and Rendertron has an express.js middleware. Run the following command in the directory of the server.js file:
npm install –save rendertron-middleware
This command installs the rendertron-middleware from npm so we can add it to the server:

const express = require(‘express’);

const app = express();
const rendertron = require(‘rendertron-middleware’);

Configure the bot list

Rendertron uses the user-agent HTTP header to determine if a request comes from a bot or a user’s browser. It has a well-maintained list of bot user agents to compare with. By default this list does not include Googlebot, because Googlebot can execute JavaScript. To make Rendertron render Googlebot requests as well, add Googlebot to the list of user agents:

const BOTS = rendertron.botUserAgents.concat(‘googlebot’);

const BOT_UA_PATTERN = new RegExp(BOTS.join(‘|’), ‘i’);

Rendertron compares the user-agent header against this regular expression later.

Add the middleware

To send bot requests to the Rendertron instance, we need to add the middleware to our express.js server. The middleware checks the requesting user agent and forwards requests from known bots to the Rendertron instance. Add the following code to server.js and don’t forget to substitute “YOUR_PROJECT_ID” with your Google Cloud Platform project ID:

app.use(rendertron.makeMiddleware({

 proxyUrl: ‘https://YOUR_PROJECT_ID.appspot.com/render’,
 userAgentPattern: BOT_UA_PATTERN
}));

Bots requesting the sample website receive the static HTML from Rendertron, so the bots don’t need to run JavaScript to display the content.

Testing our setup

To test if the Rendertron setup was successful, run the mobile-friendly test again.
Unlike the first test, the cat pictures are visible. In the HTML tab we can see all HTML the JavaScript code generated and that Rendertron has removed the need for JavaScript to display the content.

Conclusion

You created a dynamic rendering setup without making any changes to the web app. With these changes, you can serve a static HTML version of the web app to crawlers.
Post content

6 Ways Social Listening Can Help Your SEO

6 Ways Social Listening Can Help Your SEO

Gone are the days of SEO being a straightforward process of keyword research, on-page optimization and link building. As Google adds other factors to its algorithm and learns to assess website quality in a human-like way, SEO becomes intertwined with other marketing tactics. One of these tactics is social listening, which has been mainly used for social media marketing until recently. In this post, I explain how social listening can benefit your SEO.

First things first: let’s figure out the meaning behind “social listening”. The term describes what social media listening (also called social media monitoring) tools do. They crawl the Web, news, blogs, forums and social media platforms (Twitter, Facebook, YouTube, etc.) to find mention of any given keywords. Keywords are usually brand names, words that describe the industry or people’s names (e.g. a CEO, an author, an artist).

Using social listening for SEO requires proper knowledge and skill. It’s very important to set specific goals and know the details of how to conduct a proper search. Here’s how to go about it:

1. Find unlinked brand mentions and turn them into links. 

With link building still being at the core of any SEO strategy, it’s vital to cover all such opportunities. Here’s the one you might not have thought about: turning existing brand mentions into links.

If your brand has been around for a while, or if your brand, company or a specific product has had any kind of popularity at some point, it’s almost certain that there are mentions of your brand on the Internet: on blogs, forums, news sites or just somewhere on the Web. Obviously, not all of them will link back to your site: writers don’t care about promoting anyone else but themselves; they don’t have your SEO goals in mind, and the idea of linking might’ve never even crossed their minds. However, that doesn’t mean they would have a problem with adding a link if you ask them. So the only real challenge here is to find the linkless mentions. This is where social listening is relevant.

To be fair, you won’t be able to get linkless mentions with every social listening tool: you’ll need one with the Boolean search mode. With Boolean search, the user sets up the search query manually using the Boolean operators, such as AND, OR, AND NOT etc. So in the case of finding linkless mentions, the user should type their brand name as a keyword and add AND NOT link:yoursite.com/* . Tools that have Boolean search as their option include Awario (disclosure: I work for the company), Talkwalker, and Brandwatch.

2. Monitor new links to your site.

Modern link building means knowing where and how your backlinks are being built. First, it’s useful to know marketing purposes: what if you can get more out of the website that already links to you? Second, you’ve got to know if your backlinks are coming from quality sites, because, as we know, links from the spammy and untrustworthy sites can seriously hurt the rankings.

With social listening, you find out about any new links anywhere on the Internet in real time. To start looking for new links, type your site’s URL in a website/web page field, which is available in most social media monitoring tools, and choose to search from limited sources: the Web plus news/blogs. This will exclude mentions that come from social media platforms (e.g. Twitter, Facebook, YouTube, etc.). You can also use the link: operator if your tool offers Boolean search.

3. Find guest blogging opportunities. 

Any SEO will tell you that guest blogging is a sound link-building strategy. It will not bring you a sudden rankings boost, but it’s a solid, tried and true way to build up your site’s reputation. This is why finding guest post opportunities is an ongoing task for many marketers. While there are always a couple of blogs that are easy to find but impossible to get featured on, there are also other blogs which are harder to find because they are not in the first two pages of Google. Yet, they might be more relevant and have a more loyal audience — that’s what usually happens in smaller communities. These blog editors are also more likely to publish your articles. 

These guest blogging opportunities can be found with social listening. To find relevant blogs, type in the keywords that describe your industry (or rather a range of topics you’d like to write about) and wait for the tool to find:

  • all blogs that talk about this topic: you can go through them and find the ones you didn’t know about.
  • social media influencers in that industry (people with a large following that talk about your topic a lot). Go through the people in the list of influencers (all tools mentioned before offer a feature to find influencers) to see which ones have a website with a blog. You’ll be surprised to find out just how many have a relevant (maybe not that well made) website with a dedicated audience. 

There are a number of other ways to find guest posting opportunities with a social media listening tool. All of them go beyond your usual methods and are worth checking out!

4. Keep an eye on your brand’s reputation. 

In 2010, a horrible story appeared in the New York Times. In it, the author explained how negative reputation could help brands rank better in Google and cause more sales, as bad reviews generated links and buzz around the brand. The whole approach received a name: negative advertising. Merchants were acting badly on purpose, making their customers angry and, therefore, more likely to write passionate, albeit angry reviews. 

Of course, that wasn’t a good thing for Google, and after the problem became apparent, they announced they incorporated an algorithmic solution to down-rank brands that provide poor user experience. We don’t know how it works now, although they talked about their “world-class sentiment analysis system” at some point. We do know it works, though. No more similar cases were in sight. 

You are probably not one of those terrible marketers willing to torture their clients just to get higher in Google. However, social media crises do happen even to the best of brands with the best intentions. And a social media crisis can result not only in a long-term reputation problem but also in a serious ranking drop.

This is why it’s important to keep an eye on the sentiment around your brand. A social media tool with a built-in sentiment analysis will help you notice any suspicious spikes in time and take care of the problem before it goes viral or gets big enough for Google’s algorithm to notice. 

5. Grow brand mentions. 

While link building is still absolutely essential in SEO, it is becoming less and less so. You can see how passionately Google is working towards new ways of figuring out the real value of websites, understanding their content, and being more and more capable of evaluating the Internet the way humans do. And the Internet is much more than just links. These days it’s more about being popular, going viral, being heard in its various corners. And, most of all, the Internet is about social media: taken together, the single most used websites that don’t have any dofollow links. 

What does it tell us? That we should shift our attention to linkless mentions. And it’s not just our speculation. In 2017, Google Webmaster Trends Analyst Gary Illyes said in his keynote at Brighton SEO the following:

“If you publish high-quality content that is highly cited on the internet — and I’m not talking about just links, but also mentions on social networks and people talking about your branding, crap like that. Then you are doing great.”

At the same time, we know that Panda patent talks about “implied links” as a signal that could be no less important than backlinks. An implied link is defined as “a reference to a target resource, e.g., a citation to the target resource, which is included in a source resource but is not an express link to the target resource”. Sounds like a mention! 

This is why you should work towards growing brand mentions. With social listening, you can, firstly, track brand mentions. Knowing when, where, and in relation to what brand mentions appear will no doubt give you a much better idea as to how to grow more. For example, should your marketing strategy focus more on social media? If so, on which platforms? Or maybe, you have to move to forums and blogs (e.g., try marketing on Reddit?)

Second, you can imply new techniques of growing brand mentions, such as social selling and influencer marketing. 

6. Learn from your competitors. 

All the tips above can be used to monitor your competitors and discover where they get links, where they guest post, which influencers they work with, and so on. All this information can be used in your own marketing and SEO strategy. 

The workflow is as straightforward as it gets: everything that you’ve done for your brand can be completed using your competitors’ brand names and URLs. Creating a different alert for every vital competitor will make the task even easier and let you see your progress compared to that of your competitors in a clear and detailed way.

Conclusion

Social listening is full of possibilities. It’s this new, not-totally-explored-yet technology that slowly changes the way we do digital marketing. Try using it for SEO and you might see changes you never expected to see. 

The post 6 Ways Social Listening Can Help Your SEO appeared first on Convince and Convert: Social Media Consulting and Content Marketing Consulting.

Measure for Success: 7 Secrets of Actionable Content Marketing Dashboards

Elements of an Actionable Content Marketing Dashboard

Elements of an Actionable Content Marketing Dashboard

Hey, content marketers. Imagine this: You’re sitting in a marketing meeting and you hear the following:

  • Our conversions are up 50% year-over-year!
  • Our blog traffic is down.
  • We saw a big spike in traffic this month to our primary service page!
  • Our bounce rate is all over the place.
  • This blog post about “X” had 2,000 page views last month!

What are the first thoughts that come to mind? For many, the first thought would likely be: Why? Followed by a: Is that good or bad? And then finally: What do we need to do next?

If you’ve ever experienced a similar scenario, you’ve come face-to-face with insight famine. The statements above simply relay data points and lack the insight needed to take any sort of action. And this is why an actionable content marketing dashboard is so incredibly important.

When properly set up, an actionable dashboard marries data and insight, helping you quickly see how you’re performing against your benchmarks, goals, and key performance indicators (KPIs), and where you have opportunities to improve results or need to dig deeper.

What makes a dashboard actionable? What key data and insight elements should be included? Let’s dig in.

What Makes a Marketing Dashboard Actionable?

For a content marketing dashboard to be actionable, it has to answer two simple questions:

  • Is what we’re doing working?
  • Why is it (or is it not) working?

In order to answer those questions, there are specific metrics to include based on your overall objectives. For example, if your objective is to drive qualified leads for your sales team, you might measure the amount of inquiries that resulted from a piece of content, how many of those inquiries turned into MQLs, then SQLs, then ultimately customers.

If you apply those metrics to each piece of content, you’ll quickly see which content is hitting the mark, and what needs to be adjusted. And if your objective varies by topic cluster or funnel stage, you’ll need different sets of KPIs for each.

7 Essential Elements of an Actionable Marketing Dashboard

So, how do we answer those two simple questions posed above? There are several key components to consider including in your dashboard:

#1 – Content Benchmarks

Benchmarks are essential for understanding how different types of content have performed on average over a specific period of time. Your benchmarks can and should be different based on the content type and its objective.

For example, a top-of-funnel blog post meant to drive traffic will have a different benchmark than a middle-funnel infographic meant to engage. By keeping these front-and center in your marketing dashboard, you can compare at-a-glance.

#2 – Goals

More than likely your goals are to beat your benchmarks every single time. But it’s important to document your goals so you can gauge success. By adding your goals to your marketing dashboard, you can quickly determine whether you’re on pace to hit your goal and if you’ve been able to surpass it.

And ultimately, keeping that data within your dashboard will help you course-correct where needed and celebrate wins as they occur.

#3 – Real-Time KPI Monitoring

Depending on your objective for the content you’re creating, there could be any number of KPIs to watch. Automating those reports in a dashboard will help you report to your internal team and leadership in an easily consumable way.

For example, if your KPIs are pageviews and asset downloads for a specific campaign, pull those into an executive summary that’s easy to digest with an option to drill down into more specific sources of traffic and conversions.

#4 – Traffic Trends

While measuring specific pieces of content is helpful to enhance performance, it’s important to keep your eyes on overall performance as well. Knowing whether overall website or blog traffic is trending up or down versus the previous year or month will help you inform the types of content you need to create next.

For example, if you notice your organic traffic is trending down month-over-month, you will want to dig into your content report to determine why that is and what needs to be done to repair the situation on a more granular level.

#5 – Performance by Topic and Persona

If you’re trying to reach a specific persona, or increase visibility around an important topic, segmenting your data within a dashboard can be hugely valuable. You’ll be able to tell if your content is more or less visible for your target, or if your content marketing strategy needs to shift to meet a different type of demand for that topic.

#6 – Engagement Metrics

All of the traffic in the world won’t mean a thing if would-be customers are bouncing off your site immediately. Make sure you’re monitoring your bounce rate and time-on-page for each post to determine if the content is resonating and adjust as needed. While these are often bucketed as vanity metrics, that doesn’t mean they can’t provide meaningful insight or should be forgotten.

#7 – Proof of ROI

To be fully actionable, integrate your sales team’s data sources into your dashboard. With the right analytics strategy, you can pull in performance by page or post from visit to sale. This will help you prove the value of your content, and understand which kind of content converts the prospects you’re looking for.

As a bonus, your sales team will be able to share that kind of converting content as a follow-up from an initial meeting or as a pre-meeting email with their prospects.

Take Action to Spur Action

An actionable content marketing dashboard is a pivotal piece to a data-informed content marketing strategy. If your data is accurate and your dashboard is actionable, you’re in the right place to start creating and marketing incredible content that has proven ROI and helps your sales team meet their goals. Talk about a win-win!

And before I go, I’d like to leave you with a few rules for measurement mastery:

  • Setting up a custom and integrated dashboard takes time and patience. You may set it up in one way and realize that the KPIs and metrics you have aren’t the ones you need, and that’s okay. Looking at the data in different ways can tell you different parts of the same story. Edits aren’t rework, they’re character development.
  • Don’t be afraid to spend some quality time with your data. As you create the dashboard, it’s important to dig in and manipulate data from different sources to understand how it’s best pulled in to complement the rest of your data set. Sometimes this means changing the way you have forms or tags set up. The more time you spend digging into data up front and understanding the finer points, the better equipped you’ll be to answer questions and provide insights into remaining questions.
  • If you find yourself asking why, look deeper. Sometimes you’ll put all the data together expecting answers, and you’ll encounter more questions. Questions are good, it means the data is telling you something you need to investigate. Don’t be afraid to dig deep, and ask other departments or SMEs for their perspective.
  • Always, always, always annotate. Did you run a really great campaign that showed a spike in traffic or conversions? Make an annotation. Did you lose tracking for a little while? Make an annotation. Did you implement some major website changes, or do a migration? Make an annotation. Those kinds of anomalies in the data seem major at the time, but easily get lost in the day-to-day management of your world. Annotations will save you from having to dig into your notes, emails or previous campaign data every time it pops up in a report.

Don’t forget: You can’t achieve goals you don’t set. And you can’t optimize performance without measurement. Your content marketing dashboard can hold you accountable to both and more.

Are data challenges holding your content marketing dashboard or other initiatives back? Check out our post covering the five top marketing data and analytics challenges, complete with tips to start solving them.

The post Measure for Success: 7 Secrets of Actionable Content Marketing Dashboards appeared first on Online Marketing Blog – TopRank®.