business & technology for wedding and lifestyle pros

Google Analytics Advanced Segments


I’m sure most if not all of you know about the awesome tool that is Google Analytics.  It’s free, there are multiple wonderful plugins to integrate it with WordPress (I use Yoast’s plugin), and when used correctly, you can track all kinds of interactions with your website.

Google Analytics Advanced Segments

One of the easy features to implement is the Advanced Segment feature.  Advanced Segments require no updates to the Analytics code on your site, only a little bit of configuration within Google Analytics.  I use Advanced Segments for a variety of things, but one important use is to track how readers from a specific referring source interact with your website.

Creating an Advanced Segment

Let’s say I want to see how readers from Pinterest interact with my website. First, log in to Google Analytics and access your website profile. Click on Add Segment.

Google Analytics Advanced Segment Tutorial

Click the red New Segment button and give your segment a name. We’ll call ours “Pinterest Visits”. Select Traffic Sources. In the Source field, leave the condition as “contains” and in the value field type pinterest.com. Click save.

Tutorial on Google Analytics Advanced Segments

Now, navigate back to your Google Analytics dashboard. Click on the Add Segment button again. Search for pinterest, find your recently added segment, and click apply.

Using Advanced Segments

Your Dashboard will now show you how “All Sessions” and “Pinterest Visits” stack up to each other!

Analyzing Data with Advanced Segments

Now to take it even further, let’s say you sell a product and have a checkout page on your site.  If people successfully check out, they are taken to a “thank you” page.  That thank you page represents your sales conversion page.  With Advanced Segments you can now see how many visitors from Pinterest are converting into sales.

Navigate to Behavior » Site Content » All Pages.  In the search field, type /thank-you/ (or the slug of your order success page) and click the magnifying glass. Voila! Data showing you how many sales conversations you received from Pinterest visitors.

Of course, this is also useful for other page views, such as how many visitors are viewing your contact page, and other referring sources, such as external advertising you might purchase. Coming soon, we will talk about Google Analytics Event Tracking and how to combine Event Tracking with Advanced Segments, which is where the real fun comes in!

So have I inspired you to try out Advanced Segments?  How will you apply them to your site analytics?

Chime In

Setting Up Your Server


After your domain name has been registered and you’ve chosen a hosting provider, the first thing that you will want to do is create email addresses.  A few addresses you may want to add:

[email protected]
[email protected]
[email protected]

You can choose to manage these email accounts through your hosting company’s email interface or manage the account through your personal internet email address or with Outlook.  I manage my blog email addresses through my personal Gmail account.  If you would like to do the same, visit Settings ? Accounts and Import in Gmail.  Choose ‘Send mail from another address’ and follow the prompts.

Your hosting provider should also give you instructions for setting up your first FTP user (if one was not already set up for you).

What is FTP?

FTP, or file transfer protocol, is the way that you upload and download files from your server.  Your hosting provider will give you access to a web FTP program that is good in a pinch, but to get the full power of FTP I recommend downloading one of the several free FTP programs available.  I personally use Core FTP, which you can download for free here.  In essence, what this program allows you to do is to transfer files back and forth from your computer to your server with one click.

To log in to your FTP program you will need the following information:

  • Host Name – a host name can be either your server name, your website address, or your IP address.  For ease, let’s use your website address.  So, my host name would be editandpost.com
  • Username – this is specified either by your hosting company or by you within your hosting company’s interface.
  • Password – also specified by you or your hosting company during setup.

The port for log in is typically 21 (verify with your hosting provider).  Your connection type is FTP.

Once you’ve logged in to your FTP program you should see a screen that looks a bit like this:

Core FTP Screenshot

Now you’re ready to rock and roll with FTP, you have email, and your server is a blank slate. Next in this series, we’re ready to install WordPress!

Chime In

Basics of a WordPress Theme


Now that you have installed WordPress and know how to install WordPress plugins, it’s time to learn the basics of a WordPress theme! Themes hold the files that tell the browser what to display and how it should look.  If you remember from this post, PHP gets turned into HTML and that tells the browser what to display.  In coding language PHP = “get”.  CSS tells the browser how the html you have coded should look.

Basics of WordPress Theme

Photo: © Studio Firma / Stocksy

WordPress comes pre-installed with three themes, including the latest default theme, Twenty Fifteen.  Let’s take a look at the files in the Twenty Fifteen theme and see what they do.  Don’t worry if all of this is very confusing now!

PHP files control what is displayed

index.php – Displays your main blog page.  Includes PHP calls for all of the files that control how your main blog page is displayed.  Includes code for your main blog pagination.

header.php – The header file essentially sets up the page and includes PHP calls to “get” the CSS files for the theme, the blog information and title from your WordPress options, and your header image.  It also calls WordPress itself from your server and includes the opening html for the body of your page.  There can be much more included in here (and we’ll get to that when we talk about more complex coding).

footer.php – “Closes” your page in the browser.  Calls the WordPress footer.  Also typically includes any credits, copyright info, etc that you want to display.

single.php – Displays a single post.  Includes PHP calls for all of the other page elements that you display on a single post type. The post type’s content is called in content-[POST-TYPE].php.

content.php – Displays the content of a WordPress post with the “standard” post format, including its title and body.  The author bio is called in author-bio.php.

author-bio.php – Displays information about the post’s author.  Pulls from the WordPress user information fields.

content-link.php – Displays the content of a WordPress post with a “link” post format, including its title and body.

content-none.php – This file is called when a user performs an action where no results are found, including searches with no results.

page.php – Displays the framework for a WordPress page and includes PHP calls for all of the other page elements that you want to display on that WordPress page.  This file usually looks a lot like single.php, but typically does not include a call to the comments template.  The page content is called in content-page.php.

content-page.php – Displays the content of a WordPress page, including its title and body.

comments.php – Displays and formats the comments for a post.  This file is typically only called from single.php.

archive.php – Displays category, tag, taxonomy, and date archives.  Includes PHP calls for all of the other page elements that you display on your archive page.

404.php – If someone is searching for something on your site and goes to a permalink that doesn’t exist, they will see this 404 page.  Includes PHP calls for all of the other page elements that you display on your 404 page.

functions.php – A super-important file that you don’t want to edit until you know what you’re doing.  functions.php basically performs like a plugin, and any PHP code in this file will be executed when you call the function from your other template files.

image.php – Displays a single image attachment and includes PHP calls for all of the other page elements that you display on a single image.

search.php – Displays the framework for search results and includes PHP calls for all of the other page elements that you want to display on the search results.  Typically looks quite a bit like archive.php.  The search results content is called in content-search.php.

content-search.php – Displays the content of a WordPress post when it appears in search results, including its title and body.

sidebar.php – Displays the sidebar widgets that you have defined; if no widgets are defined, displays a default sidebar.

back-compat.php – Contains functions to help with the theme running on WordPress versions before 4.1.

customizer.php – Contains the functionality that allows for customizations to the Twenty Fifteen theme (under Appearance » Customize).

custom-header.php – Contains the functionality that allows for a custom header in the Twenty Fifteen theme (under Appearance » Header).

CSS files control how things look

style.css – a theme’s stylesheet is where the CSS for a theme is held.  Themes can have one or many stylesheets.  CSS is pretty complicated, so for right now know that each little section of CSS is called a selector, and selectors control how whatever is inside them is displayed.

rtl.css – If you are publishing in a language that reads right to left, this stylesheet will be used.

English, please?

Let’s look at an example and maybe this will start to make more sense.  Remember single.php?  It’s the file that displays your single post page.  We’ll use a common single.php format, with the content on the left and sidebar on the right.

single.php is going to start by doing a PHP call for header.php. Remember, the header.php has already called in all of your stylesheets and WordPress itself.

<?php get_header(); ?>

Each section of your page is styled using CSS selectors inside either <div> or <span> tags.  Think of a <div> tag as a section of your page and a <span> tag as a portion of a section.  Div tags (“divs”) can either be IDs (noted with a #) or classes (noted with a .).  IDs are meant to be used once on a page, while classes are intended for items to used multiple times. Divs are opened with <div> and closed with </div>.  The header.php file probably had several divs to display your header image, menu bar, etc.  In single.php the main content area of your page is also enclosed in a div tag.  Let’s call it “primary”.  When you include a div or span tag in your php file, WordPress will look in your stylesheet for the div or span tag name and display the results using the CSS selectors assigned to that tag.  Because we are calling a single post, the class of this primary div will be “content-area”.  We’ll also tell the browser that this is the main content area.

<div id="primary" class="content-area">
     <main id="main" class="site-main" role="main">

The template is then going to ask the WordPress database for the data from the post itself. This portion is referred to as “starting the loop”.

<?php while (have_posts()) : the_post(); ?>

Once it knows what the post is, the theme calls the appropriate content template file for the post’s format.

<?php get_template_part( 'content', get_post_format() ); ?>

If the post has no post format (let’s say it’s just a standard blog post), it will look to the file content.php. content.php lets the browser know that this is an article, with both header and content sections.  The WordPress function the_title(); calls the post title and the WordPress function the_content(); calls the post content.  To simplify:

<article>
     <header class="entry-header">
          <?php the_title(); ?>
     </header>

     <div class="entry-content">
          <?php the_content(); ?>
     </div>
</article>

That’s pretty much it for content.php. Once content.php has finished its display, we return to single.php.  single.php would next typically include a call to your comments.php file.

<?php comments_template(); ?>

Now we’ve “looped” through a complete post, so we’ll tell WordPress we are done.

<?php endwhile; ?>
</main>
</div><!-- closes .content-area #primary -->

Lastly, we’ll call the sidebar and the footer.  Remember, the footer closes the page, so after the footer is called, single.php has done its job.

<?php get_sidebar(); ?>
<?php get_footer(); ?>

This is a lot to wrap your arms around, I know!  But I hope it’s starting to make some sense, because we’re going to be talking a lot more about themes as we start to edit each of the theme files, make new theme files, and add in awesome new functionality!

Any questions so far?

Chime In

Gravatars


You may have noticed in the comment sections of each Edit and Post post that some comments have photos and others have the default avatar.

WordPress by default supports photos in the form of Gravatars, or globally recognized avatars.  It takes about 30 seconds to sign up for a Gravatar.  If you are the owner of a WordPress.com blog, or have a WordPress blog installed on your own server and use the Akismet or Jetpack plugins, you can sign into Gravatar with your existing WordPress.com username and password. Otherwise, simply:

  • Click here
  • Input your email address
  • Click on the link in the confirmation email
  • Create a Gravatar username and password
  • Import a photo of yourself and crop it as desired
  • Add as many other email addresses to your account as you like

And voila, the next time you comment here (or on any other WordPress blog with avatars enabled), we will get to put a face to a name.  Yay!

For those of you who have WordPress blogs already (or will be installing them soon after reading the Building Your WordPress Blog post series), include avatars in your comment section by visiting Settings -> Discussion in your WordPress dashboard and checking “Show Avatars”.

Chime In

So You Think You Want To Blog?


As small business owners, entrepreneurs, or hobbyists, if you are considering adding a blog to your business the first question that you should ask yourself is:

“Why am I blogging and what do I hope to gain?”

Read This Before You Start a Blog

Bloggers are:

  • Writers
  • Developers
  • Librarians
  • Social media managers
  • Intellectual property experts
  • Editors
  • Graphic designers
  • Advertising execs
  • Marketing gurus

Blogging offers lots of amazing rewards but comes with a great deal of responsibility, and each time you put a post, a tweet, or an email out into the blogiverse you are representing yourself or your business… that’s a lot of pressure!

Sit down to think for a moment about the blog you hope to create, the audience you want to reach, and the true reason you want to start a blog.  Make a pro/con list.  Consult your business plan.  Read other people’s blogs to get an idea of the audience you may want to reach and the network you want to join.  Then ask yourself…

“Am I qualified to blog about _____?”

Whatever your chosen topic, you should be a subject matter expert in that field.  Your field may be yourself.  It may be your business.  It may be your own taste.  Clearly you are an expert in all of those!  But let’s say you want to start a blog about gardening.  What can you add to the gardening blog industry?  Do you personally garden?  What do you know about growing specific plants, vegetables, or flowers?  Are you prepared to answer questions from readers and advise them on making their garden grow?  If the answer to these questions is no, stop here.  Do not pass Go, do not collect $200, and do not start a gardening blog.  But if you’re a bona fide gardening pro, then the last and most important question is…

“Do I have time for this?”

For many of us, blogging is a full-time job (on top of our full-time job).  It’s a huge commitment.  You must take the time to realistically assess whether or not you will have the time and energy to devote to your site.

If you’re a brave soul and are ready to jump in feet first, I’m going to be doing a series of posts to help you get started building your WordPress blog. I remember vividly how it feels to be brand-new to the blog world and tackle the setup of a website, so we will go back to basics, answer all of your burning questions, and you will be blogging in no time.

If you’re on the fence, well, that’s OK, too.  Starting a blog is not a decision to be made lightly, and we’ll have much more discussion on the realities and benefits of blogging, and why it may or may not be for you.

For all of you experienced bloggers reading, what other factors should those who are thinking about creating a blog take under consideration?

Chime In

TO TOP