Using Wordpress to host your landing page?
In this guide, we'll be setting up a PATH based pURL landing page hosted in Wordpress. We'll assume that you've already installed and deployed Wordpress and are ready to begin setting up pURL integration.
(2) If you are using QR codes or email only; to distribute your pURLs, then this step is purely discretionary. Your entire Wordpress site is now ready for HTML personalization and capable of receiving pURL visits in Query String format at any page in your Wordpress site. (I.E. http://www.my-wordpress-site.com/hello-world/?_purl=JohnSmithX2)
If you expect or require visitors to enter the landing page address by hand, or simply prefer a cleaner URL - you'll need to add a rewrite configuration to support your permalink or WP URL of choice. To prevent conflicts with other Wordpress pages, first choose a virtual directory name that does NOT already exist as a permalink or post in Wordpress. We'll use directory /demo/ for this example, so our campaign URLs will look like:
Note: It is not necessary that the directory /demo/ exists in your Wordpress installation, and to avoid any potential conflict ensure that it doesn't exist before continuing.
Then we'll need to select a wordpress page permalink to be our default "landing page" for all purls in this campaign; i.e. the page each purl visitor will see when they enter their personalized URL in their browser address bar, or click on a link in their personalized email message. For this example, we'll use the Wordpress page named "welcome-page".
At this point, you can choose a Wordpress rewrite method that works best for your situation. If you are using a recent version of Wordpress, use Method #1 compatible with most typical Wordpress installations. If you're an IT professional or you are using an older version of Wordpress (earlier than 3.1), and using the Apache HTTP Server, Method #2 using Apache's mod_rewrite and mod_proxy may be preferable.
Method #1 (Wordpress plugin)
- Wordpress 3.x or greater.
- Ability to install Wordpress plugins.
- Wordpress rewrire plugin version 0.2.1 or greater.
Once installed and activated, use the plugin to backup your current Wordpress rewrite rules, in case you should need to restore them later.
Next, check your permalink structure. The following rewrite configuration is tested against permalink settings "Post name" or "Custom Structure" set to "/%postname%" or similar. However, if you know what you are doing any option could be made to work.
Then add a rewrite configuration for your pURL landing page slug.
- On the Rewrite plugin, click add Rule.
- In the Rule Pattern field add "demo/([^/]*)/?(\?.*)?$"
(replace the word demo with your chosen virtual directory name)
- In the Match field enter "index.php?pagename=welcome-page&$matches"
(replace the welcome-page with your chosen wordpress page slug)
- Save the rewrite configuration by clicking Save and Flush Rules.
- Lastly, test and reorder the rules by entering "http://www.example.com/demo/JohnSmithX2" in the "Test" field above the list. Locate the new rule you just entered and move it to the top of stack by clicking and dragging from the Reorder column on the right. Then click Save & Flush Rules to apply the change.
As long as you have a matching Access Control rule in your purlHub campaign, you should now be able to view personalized URLS like http://www.example.com/demo/ClaytonSlawsonUq
Method #2 (Apache)
- Apache 2.x or greater.
- Apache mod_rewrite enabled.
- Apache mod_proxy enabled.
Locate the file named ".htaccess" in the root of your wordpress installation. Open it with your text editor of choice and add the following line immediately below the "RewriteBase" directive.
RewriteRule ^demo/.* /welcome-page/ [P,L]
The edited file resemble the following:
At this point, http://www.my-wordpress-site.com/demo/JohnSmithX2 should display the wordpress page http://www.my-wordpress-site.com/welcome-page/
(3) Finally, add some personalization to your site by editing your pages adding purlHub tagged elements. Start with the landing page "/welcome-page/", of course. Keep in mind any secondary page navigation by you pURL visitors can be personalized also.
Start by adding a First Name & Last Name greeting.
Add personalization tags on as many pages as you like. That's purlHub integration on a Wordpress site.