Community Edition (CE)¶
The Community Edition has all relevant modules and sample data included so that you can quickly try CampaignChain.
0. Preparation¶
- Verify that your system meets the minimum system requirements to run CampaignChain.
- Ensure that your MySQL server is running.
1. Download CampaignChain¶
Download the Community Edition from www.campaignchain.com/download.
Extract the contents of the archive to a directory on your system.
2. Set up Database¶
Launch the MySQL command-line client and create a new MySQL database for the application.
CREATE DATABASE campaignchain_db;
At the same time, create a user with full privileges to the new database, as shown below:
GRANT ALL on campaignchain_db.* TO 'campaignchain'@'%' IDENTIFIED BY 'gue55me';
Edit the app/config/parameters.yml file and define the database host, name, user and password.
Example:
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: null
database_name: campaignchain_db
database_user: campaignchain
database_password: gue55me
From within the application’s root directory, issue the following command which will create the table structures in the database:
$ php app/console doctrine:schema:update --force
3. Register Apps with Various Online Channels¶
To be able to post to Twitter, Facebook and LinkedIn from within CampaignChain, register an App with these three services, by following the steps below:
- Go to the following pages:
- Twitter: https://apps.twitter.com
- Facebook: https://developers.facebook.com/apps
- LinkedIn: https://www.linkedin.com/secure/developer
- Fill out any required fields.
Once you have registered a new app, you will receive a key and secret that will be displayed to you under above pages.
Now, open the sample data file vendor/campaignchain/distribution-ce/Resources/data/campaignchain/ce.yml and replace the text replaceme with the app key and secret provided by Twitter, Facebook and LinkedIn.
# vendor/campaignchain/distribution-ce/Resources/data/campaignchain/ce.yml
\CampaignChain\Security\Authentication\Client\OAuthBundle\Entity\Application:
application1:
resourceOwner: Twitter
# Specify your Twitter Consumer Key and Secret here:
key: replaceme
secret: replaceme
application2:
resourceOwner: Facebook
# Specify your Facebook App key and secret here:
key: replaceme
secret: replaceme
application3:
resourceOwner: LinkedIn
# Specify your Facebook App key and secret here:
key: replaceme
secret: replaceme
Next, execute the below command to load the above sample data into CampaignChain:
$ php app/console h4cc_alice_fixtures:load:files --manager=default --type=yaml --seed=42 vendor/campaignchain/distribution-ce/Resources/data/campaignchain/ce.yml
4. Configure CampaignChain Scheduler¶
The CampaignChain scheduler is a PHP script that executes scheduled Operations.
On Linux or Mac OS X, configure it as a cron job so that it runs automatically every minute:
$ crontab -e -u <username>
*/1 * * * * /usr/bin/php /path/to/symfony2/app/console campaignchain:scheduler
On Windows, you could use the task scheduler or AT command to achieve the same.
5. Get Bitly Access Token¶
CampaignChain’s CTA tracking mechanism uses Bitly to shorten URLs that contain the tracking ID.
Please request a Bitly access token here: https://bitly.com/a/oauth_apps
Next, open the file app/config/config.yml in CampaignChain and replace insert_here_you_bitly_access_token with the access token you requested.
# app/config/config.yml
hpatoio_bitly:
access_token: insert_here_your_bitly_access_token
7. Log In to CampaignChain¶
Point your Web browser to http://localhost:8000/ and log in with:
- username: admin
- password: test
8. Install Modules¶
Visit the module installation screen at http://localhost:8000/system/modules/ and install all modules.
Success!¶
CampaignChain is now installed, configured and ready for use!
To make full use of CampaignChain’s capabilities, you could now