API & Docs |

View Documentation &
Explore our RESTful API

Quick Start 2017-06-26T21:07:19+00:00

Quick Start

If you haven’t done this already, you’ll need to create a purlHub account. You can create a free account for demo purposes at

Create a new campaign OR use the existing example campaign. If you’re using a Free account, you are only allowed one campaign, so you’ll need to repurpose the demo campaign.

purlHub uses campaign buckets to organize data and activity.  Each campaign includes a unique API token to limit access to data to locations that you control.

In the URL Formatting section, click Create a URL Template and enter the location for your demo.  This defines where your demo is hosted as well as the purl format. Say you want to host your demo in a folder on your domain called “demo”, options include:

  1. Path – e.g.
  2. Subdomain –
  3. Query String –

The path-based format is the most flexible, and is the default choice. Note that your URL formats will show an error until you have setup security and configured your hosting.

Within the campaign, go to the API Access & Security section and add a rule to the access control list (ACL) in the form of the domain path of your demo. This ACL rule grants API access to campaign data ONLY from this URL. Use the wildcard character “*” to grant access to all files and folders beneath the specified path.

For example, if your demo will be placed in the demo folder of your website (and you chose path-based URL format), add this ACL rule:*

Give the ACL rule a descriptive name.

The ACL rules must match the URL formats that you set above. Keep in mind that you’ll need to create separate rules for both www and non-www, if you plan to use both.

If you are using Query String URL formatting, no further configuration is required. If you wish to use path-based or subdomain-based URLs, you need to setup rewrite rules to handle personalized URLs.

For Linux hosting, you’ll add the following to an .htaccess file in the directory that houses your demo:

RewriteEngine On
RewriteBase /demo/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.html

Note the RewriteBase must match the location of your demo.

Refer to the following for Windows IIS servers:

Use the sample profiles in the example campaign OR purge the campaign and load your own data in .CSV format.

You can customize the personalized URL format during the upload process.

Add the purlService Code

First, add the purlHub initialization code to the section of your demo page. It’s located on the Landing Page Integration section.

Add Merge Fields

The purlService makes a particular contact’s profile data available based on the unique personalized URL. purlProfile data can be easily merged into the HTML using class tags.

Welcome Valued Customer

Data is merged into the inner HTML of the tag. Default data can be added for anonymous (non-purl) visits.

Refer to the purlService documentation for further detail.