Notice: Undefined index: order_next_posts in /nas/content/live/gadgetmag/wp-content/plugins/smart-scroll-posts/smart-scroll-posts.php on line 194

Notice: Undefined index: post_link_target in /nas/content/live/gadgetmag/wp-content/plugins/smart-scroll-posts/smart-scroll-posts.php on line 195

Notice: Undefined index: posts_featured_size in /nas/content/live/gadgetmag/wp-content/plugins/smart-scroll-posts/smart-scroll-posts.php on line 196

Schedule your social media marketing with CampaignChain

CampaignChain, an open source tool for social media marketing, makes every campaign easier

Social media is one of the most important aspects of marketing today. An organisation can’t think of a marketing strategy without social media playing a massive role. But with the ever-increasing number of social media platforms, managing campaigns across different platforms is a big challenge. The high dependence on social media means there is a need to properly plan, execute and monitor the campaigns to measure the overall impact – you can’t just say a campaign did well just because you feel so. These issues are especially relevant for social media marketers who manage social media campaigns. As the need for social media marketers has gone up, the job has become far more complex.

In this article, we will introduce you to CampaignChain, an open source social media marketing tool that can help you create, plan, execute and monitor your social media platforms. Not only is this a great help for a social media marketer, or someone aspiring to become one, but also for people who run small businesses and need to handle social media themselves. For the tutorial, we have used the stable revision from the CampaignChain GitHub repository, installed on Ubuntu 14.04. You will also need Java (1.5 or above) and PHP (5.4 or above). Let’s now move on to the installation steps.

1. Preconditions

Before we begin installing CampaignChain, let’s take a look at the various preconditions required for the installation. First is MySQL. As of Ubuntu 12.04, MySQL 5.5 is installed by default, but if you don’t have MySQL installed on your system, just type:

  sudo apt-get install mysql-server-5.5

To check if you have MySQL installed, type mysql –uroot –p. If you get a prompt asking for a password, it has confirmed that you have MySQL installed. Enter the password for the root user (press Enter if you have not set a password). Once you have the MySQL prompt available, type, create database campaignchain_ce;. Now we have our database ready for CampaignChain installation. Exit the MySQL prompt using exit. The next step is to install Java, if you don’t already have it. To check if you have Java, type java –version. If you get a message saying Java cannot be found, you need to install Java, which can be done with the following:

  sudo apt-get install default-jre

Cross-check the installation using java –version; you should now have a version of JRE installed. Check the PHP version on your machine using php –v. If you don’t have it installed or the version is older than 5.4, you need to install PHP using sudo apt-get install php5 php5-intl. This also installs the intl extension required for CampaignChain. Even if you have PHP installed, you may need to install the intl extension.

Create Activity

2. Installation

The next step is to install Composer. Composer is a dependency management tool in PHP, and CampaignChain uses it to manage all the packages and modules it needs. To install Composer, you may need to switch to the root user. Type sudo su in the command prompt and enter your password. Once you are a root user, type curl -sS | php and then php composer.phar to run composer. Next is Bower, the JavaScript package manager. To install it, you need to have npm installed. Run sudo apt-get install npm and then npm install –g bower. If all the steps are successful, you can now download the CampaignChain base system. Type:

  composer create-project –stability=dev

campaignchain/campaignchain-ce campaignchain


… in the command prompt. This downloads the latest revision from CampaignChain’s GitHub repo to the path campainchain/campaignchain-ce. It will prompt you for installation parameters. As we have used all the default values, including the MySQL database name, the only fields you need to fill in are the database_user and database_password fields.

3. Finalise installation

Finally, change to the CampaignChain directory using cd campaignchain. Then clear the cache using sudo php app/console cache:clear –env=prod –no-debug and then sudo php app/console assetic:dump –env=prod –no-debug. You can set up the CampaignChain scheduler as a cron job to help make sure that it runs every minute to check for updates. Run the command:

  crontab -e -u <username>

  */1 * * * * /usr/bin/php /path/to/campaignchain/

app/console campaignchain:scheduler

You are now ready to run the server using:

  sudo php app/console server:start

This starts PHP’s built-in web server. The server listens at localhost:8000; access it on your browser to view the installation page. On this page, you will need to set up a few details, such as a mandatory bitly token, an admin user and also a password.

CampaignChain Installation page

4. Campaigns

Now that you have CampaignChain up and running, let’s see how to get started with managing your social media campaigns. The first step in this direction is a campaign – it is, after all, at the heart of CampaignChain. Every campaign consists of one or more communication channels, and they also have activities and milestones. To create a campaign, click on the New button on the top menu bar and then select Campaign. Next, you have the option to create it either using a campaign template or as a scheduled campaign. Since this is your first time, let’s stick to a scheduled campaign for now. Finally, just select a name, duration and the assignee for the campaign, then click Save. Congratulations – your first campaign is ready!

5. Channels and locations

The next step is to link your social media profiles to CampaignChain via channels and locations. It is important to learn the difference between channels and locations first. Channels are online pathways through which the content is delivered to the recipient, and every channel has one or more locations where the content is actually published. For example, for a Twitter channel there is one location – the Twitter stream – while for a website there can be several locations, depending on the number of pages in the website.

Note that to be able to link your CampaignChain installation with different social media platforms like Facebook, Twitter, etc, you need to create an app on the respective platform and get the API Key and API Secret. Check the documentation of these platforms to learn more.

Once you have the API Key and API Secret ready, click on the New button from the top menu bar and select Location. Here you can see various channels like Facebook, LinkedIn, SlideShare and Twitter. Each channel has a different workflow based on its usage. For example, if you choose Facebook, LinkedIn or Twitter, you will be asked for the API Keys and Secrets; if you choose a website, you will be given a snippet to paste to a HTML page. Basically, the idea here is to authenticate if you are the actual owner of the profile you want to handle via CampaignChain. As you authenticate an account to work with CampaignChain, you automatically create a new channel – so if there are three Facebook accounts connected, there are three channels. You can also see the locations you have created under the Locations menu, accessible via the gear icon in the top-right corner.

Create Location

6. Activity and operations

Every location allows one or more activities to be undertaken. For example, creating a new tweet is an activity on the Twitter stream (location). Operation takes this a step further, as it enables gradual activity. An activity must have at least one operation. To create an activity, click on New, located on the top menu bar, and select Activity. Then select the campaign for which you’d like to do this activity, the location where you want the activity to be done (eg Twitter stream) and the activity itself (eg post tweet). Finally, you need to add the new message that you would like to be published, the activity name, due date and time.

7. Plan

Now that you are aware of the common terminology used in CampaignChain, let’s take a look around at other features that make handling campaigns easy. The first among them is Plan, which enables you to plan all of your campaigns on a well-designed timeline or calendar. To go to the planning view, click on the Plan button in the top bar and select Scheduled Campaigns in the drop-down that follows. On the next page, you can see all the scheduled campaigns on your timeline. Note that you can slide along or even stretch/compress the campaigns to adjust their execution times. To switch to the calendar view, simply click on the calendar tab. Here you can also see the activities related to the campaigns. To adjust an activity’s execution time, drag and drop it to a different date.

Planning also lets you plan for campaign templates. So if you have created a few templates, just adjust them as per your requirements and, when you create campaigns from the templates, you will have everything ready –just add the activities and you are good to go!

Campaign Planning

8. Execute

This section will give you good control over the activities and milestones designed to be part of your campaigns. You can view all the upcoming activities and milestones from the execution window – just click on any of them to edit or update. To go to the execution view, click on the Execute button located in the top menu bar. On the next page, you will see all of your upcoming activities, milestones and ongoing campaigns. Note that this page will only show current or upcoming information, so if you would like to view the older details then click on the All Activities / All Milestone / All Campaigns buttons.

9. Monitor

The next feature is monitoring. After all of your efforts, it makes sense to track and see the results – monitoring lets you do exactly that. Click on the Monitor button from the top menu bar.  You can then see the types of reports available. Let’s first check the ‘CTAs per location’ report: click on the open icon on the far-right. Next, select the campaign and location that you would like to view. Note that the tool only shows options for which reports are available at the time. Finally, click on the Save button to view the report. This report tracks through from all of the locations to the target location, and this can be very handy for identifying the location’s contribution to overall traffic. The next report is ‘Metrics per activity’. As the name suggests, this shows you the performance of each and every activity within a campaign, and serves very well for marketers who like to play around with different status formats to check the overall impact of each style.

CampaignChain Milestone

10. Milestones

Another important aspect to tracking a campaign is the number of pre-defined milestones achieved. Not only are they important from a monitoring perspective, but they also make sure that people behind the campaign are motivated and continue to push forward. You can easily add milestones to a campaign in CampaignChain. Click on the New button in the top bar and select Milestone. Now select the type of milestone – currently, there is only one available: scheduled campaigns. Then select the campaign where you would like to add the milestone. On the next page, fill in the name, due date and the assignee of the campaign to create the milestone. You can check them out in the Execute tab.    And that’s it – good luck with your campaigns!