All you need to know about links, slugs and URLs in P4. How they are formed, how to customize them and even redirect

📚 Manage Planet 4 > Administration > URLs

What are URLs, slugs and (perma)links

Sometimes they are confused, but URL (Uniform Resource Locator), slug and link are 3 different things:

And UTMs? Nothing to do with Planet 4, but more with Analytics. Check this awesome video for UTMs.

The P4 links settings

In the Admin mode, go to Settings > Permalinks and select “Custom structure”.

🤔 Key Info: To ensure consistency across P4 sites, the POST permalinks basic settings should follow the Custom Structure: /%p4_page_type%/%post_id%/%postname%/

🤔 Key Info: If you change the URL structure, all existing links will be updated and redirected, given that the %post_id%  is kept!

Posts URLs

With these settings, each time a post is created, it will get assigned a automatic URL, which follows this structure:

Posts can’t get the full URL edited, but only the final part (= post title), which automatically replaces spaces with “-“.

The link editor in posts

Pages URLs and “Parenting”

Pages get URLs generated in a different way, since we can modify the way pages get organized using URLs.

Let’s see the Energy page, for example, which we want to be under “Issues”.

In the Edit mode we can edit the last part (title), exactly like in POSTS (see snapshot below)

We can, however, attribute a Parent page, which URL will appear before the page title.

This can be done in Edit Mode, on the right side, in “Page Attributes”. The dropdown will show you all the existing pages, but you can select only one.

By customizing the “parenting” page, here’s what our URL looks like:

The “Parenting” relations can be accessed in Admin Menu > All Pages

Page parenting can be accessed in the Admin menu > All pages

#Tag pages url

In Settings > Permalinks you can customize your Tag pages url, to change from /tag/xxx to /whatever/xxx

Insert links in P4 Content

Pretty easy, use the link icon in the WYSIWYG editor (see below)

Whether you insert URLs in post / page edit mode or by customizing buttons in Blocks, there is NO NEED to use act.gp (or any link shortener) in P4 content, mostly because the cross-domain tracking in Google Tag Manager does not pick up shortened URLs.

🤔 Key Info: shortened URLs (act.gp or others) will not be tracked in Google Analytics account, therefore P4 pages with those will have corrupted traffic data! So, NO short URLs (and if possible, no UTM) in P4 content, just the regular petition / external link/s !

For ex.: in the beautiful – https://www.greenpeace.org/international/act/ the “TAKE ACTION” button had http://act.gp/2CUGEEI – and was not tracked properly.

Replacing the shortened URL with the regular petition url – https://act.greenpeace.org/page/18001/petition/1 – allows to track conversions coming from Planet 4.

Map, create and manage redirects

P4 redirects

P4 redirects are managed by a wordpress.com Plugin called redirection.me.

🤔 Key Info: Before going live, all migrated URLs should be mapped out to understand and set up redirects.

As a LAST exercise of the Deployment phase, you should extract all the URLs of your Planet 4 site and map them down in a Google Sheet. This is useful for 2 reasons:

  1. Perform a very last quality check if all content has been migrated correctly
  2. Identify internal redirects to be implemented

To setup a redirect, in the P4 Admin dashboard, go to the left side menu and click on Tools – > Redirection

Go to the Add new redirection at the end of the page, insert the URL (or regex) you want to redirect/ the short URL in the Source URL field and the destination one/ where you want to send the traffic in the Target URL field, then click on Add Redirect. The new redirect should appear in the list above.

You can also add “Regex” (aka – regular expression, matching many RLS).  To apply regex redirects , you must insert (.*) in the Source URL and /$1 at the end of the target URL

In the example above we are redirecting everything with url construct starting with /international/global/ to the archived domain.

P3 redirects

After P3 is archived and before is permanently decommissioned, it`s possible the web administrator would want to set redirects for some P3 pages directly to P4.

The best solution is to set redirects on page redirects. Here are the steps:

  1. login to Planet 3
  2. select the page you want to set the redirect for and click Edit
  3. select Shortcut/ External Link  from the top bar
  4. In the Link Type field, select Link to page on another Web site
  5. Add the URL from P4 site in the External link field
  6. Click on Save and Publish 

Templates & links