How to add Google Analytics to Ghost Blog

Google Analytics is one of the most popular and powerful tool, following article explains how to use add Google Analytics to Ghost Blog. There are two methods to do so.

Adding Google Analytics using Code injection

Follow these steps and you are all set.
1. Add your website to and get the unique code.
2. Login to Ghost Admin section and go to Settings –> Code Injection

3.Insert your code in this section and click “Save” and you are done.

Adding Google Analytics to Ghost theme

  1. Add your website to and get the unique code.
  2. Go to ..contentthemes
  3. Find default.hbs file and open it in your favorite a text editor. I use brackets.
  4. Add it just below the {{ghost_head}} and above .

    5.Restart the ghost and you are all set.

How to install Ghost blog for free on Heroku

Ghost is a fully open source, hackable platform for building and running a modern online publication. It is a very good alternative to WordPress and blogger and Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud. Heroku offers a free plan for experiencing the cloud. You can install Ghost on Heroku for free. Following is the step by step guide for installing Ghost Blog on Heroku.

  1. Download Ghost blog from here:
  2. Unzip it into required folder.
    Unzipped folder name is “ghost-0.11.3”. You can keep the name same or change it to any other name. I have renamed folder to “mytravels” as this is my blog name.
  3. Initial NPM and Install required NPM modules
F:mytravels>npm init  

Please follow the instructions as it appears on the screen.

F:mytravels>npm install  

This will take some time as it will install all dependencies.
4 . Initiate git repository

F:mytravels>git init  
Initialized empty Git repository in F:/mytravels/.git/  
  1. Login to Heroku by entering your Heroku credentials
F:mytravels>heroku login  
Password (typing will be hidden):Logged in as  
  1. Create Heroku application
F:mytravels>heroku create  
Creating app... done, desolate-journey-89792 |  

cross check git configuration using following comments

F:mytravels>git remote -v  
heroku (fetch)  
heroku (push)  
  1. Add PostgreSQL database
F:mytravels>heroku addons:add heroku-postgresql:hobby-dev  
Creating heroku-postgresql:hobby-dev on desolate-journey-89792... free  
Database has been created and is available  
 ! This database is empty. If upgrading, you can transfer
 ! data from another database with pg:copy
Created postgresql-slippery-42334 as DATABASE_URL  
Use heroku addons:docs heroku-postgresql to view documentation  
  1. Get database configuration as below:
F:mytravels>heroku config  
=== desolate-journey-89792 Config Vars
DATABASE_URL: postgres://  

These details appear in following order:

  1. Rename config.example.js to config.js and add following code
        production: {
        url: '',
        mail: {},
        database: {
            client: 'postgres',
            connection: {
                host: 'POSTGRES_HOST',
                user: 'POSTGRES_USER',
                password: 'POSTGRES_PASS',
                database: 'POSTGRES_DB',
                port: '5432'
            debug: false
        server: {
            host: '',
            port: process.env.PORT
  1. Add your domain name using following command
  1. Deploy these local changes to Heroku.
git add .  
git commit -am "first commit"  
git push heroku master  

Keyword Research

Whether one is trying to find out niche website, new trends in domain or looking for a new subject for blogs next article, keyword research is the starting point. Developing a list of keywords is one of the first and most important steps in any search engine optimization initiative. Keyword research is a critical component for search engine optimization because when used correctly it provides a road map for both the design and execution of building websites and developing content.

Your keywords in web content makes it possible for people to find website via search engines. A website that is well optimized for search engines “speaks the same language” as its potential visitor base and search engine. In other words, one need to know how people are looking for the products, services or information that website offer, in order to make it easy for them to find you—otherwise, they’ll land on one of the many other pages in the Google results. Implementing keyword SEO will help website rank above competitors.

Following article will discussion scientific method and step by step activities to be done for keyword research. It will also list useful and free tools and websites for keyword research.

What is keyword Research?

“Keyword research is a practice used by search engine optimization professionals to find and research actual search terms people enter into the search engines when conducting a search.”
A keyword is generally a word or phrase that is a topic of significance. Searchers use keywords as a way to identify and verbalize their problem or topic in which they’re looking for more information
Benjamin Brandall from calls it a game, the front page of Google is the leaderboard, with each ranked page being one of the top 10 scores.

Competitor Analysis
  1. Using competing website using
Find Keywords
  1. keyword search box using
  9. Using to find related keywords
  10. Using social media websites (Facebook and writer) to find what people are searching
Keyword Trend
  1. Using google trends to identify search volume over period of time

Keyword research should be an ongoing and ever-evolving part maintaining a website. Old keywords need to be reevaluated periodically, and high-volume, competitive keywords (or “head” keywords, as opposed to long-tailed keywords) can often be usefully replaced or augmented with longer, more specific phrases designed not to bring in just any visitor but exactly the right visitors.

Reference articles

Git Quick Reference

Git is the most useful tool for developers but if someone does not use it for a while, it all seems confusing. Git is tricky. Here are some of the most commonly used command.

Installing git

$sudo apt-get install git

Create new git repository

$git init

Create git repository on server

$git init --bare

Please note the difference : A bare repository is a git repository without a working copy, therefore the content of .git is top-level for that directory.

Use a non-bare repository to work locally and a bare repository as a central server/hub For example, when you create a repository on, it is created as a bare repository.

To conclude, the repository on the server side is going to get commits via pull and push, and not by you editing files and then committing them in the server machine, therefore it is a bare repository.

You can push your changes from local to remote by using following command

$git remote add live ssh://

once this is added you can check all remotes using following command

$ git remote -v
live ssh:// (fetch)
live ssh:// (push)

Deploying the changes.

Once your changes are ready, you can deploy it using following commands

git add .  
git commit -m "commit comment"  
git push live master  

Copy remote repository to your local folder.

$git clone ssh://  

To get list of files changed in directory

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)

modified: MySQL/

Untracked files:
(use "git add <file>..." to include in what will be committed)

MS Excels/

no changes added to commit (use "git add" and/or "git commit -a")

Get commit history

$git log


How to Deploy Ghost blog on Heroku

Please find below simple steps to deploy your ghost blog on Heroku for free.

  • Download zip file from Ghost blog
  • Unzip it in local folder
  • Go to the unzipped folder using command line and run following commands:
npm init  
npm install  

This will install all dependent modules. Once its done intiate a local Git repository using following command

git init  
  • Now is the time to create your heroku application using following command
heroku create`  
  • Cross check if application is created by using following command
git remote -v  
  • Add postgresql database using following command
heroku addons:add heroku-postgresql:hobby-dev`  

You can get the details of the database using following command

heroku config  

Database is creating using following convention.

  • Now you are all set, just push these changes to Heroku cloud by using following commands.
git add .  
git commit -am "make it better"  
git push heroku master  
  • Go to your heroku account and your Ghost blog is ready for usage.

Additional steps:
If you have a domain name which you want to use for your blog, Heroku allows you to use it even for free account. Use following command to add domain.

heroku domains:add  

Cross check if domain name is added correctly using following command:

heroku domains