Skip to main content
Skip table of contents

Conditional Content in pages

Conditional Content is a powerful tool if you want to use a single page to display different content to different supporters when they click on email links, based on which Profile they are in. For example you could:

  • Show different images depending on supporters’ campaign preference
  • Explain the campaign in more detail if the supporter hasn’t taken action on it before
  • Link to a donation page if they haven’t given before

Like Conditional Content emails, page-builder’s Conditional Content is based on supporter profiles. Because the system needs to know who they are, it will only work from campaign links added to emails, or from pages that are redirected to using the in-built tools.

Applying profiles to your page

Before setting up conditional content, you need to have the profiles that you want to display different content for set-up first. Read more about profiles here.

The next step is to apply the profiles to the page or pages that you want to display the different content for. To do this, edit the page and in the right-hand toolbar click on Conditional content and then Profiles.

You will be presented with a window in which you can add your profile, or profiles, to the page. Ensure you click the + button and save to attach the profiles properly. The maximum number of profiles you can add is 20.

Add a profile: Your current profiles will be listed here. Click the green plus sign to assign them to your page

Priority: You can set the priority of multiple profiles by dragging them up and down the list. The higher profiles will take priority, which means that if a supporter is in multiple profiles, they will be presented with the highest priority profile’s content

Matched: This shows the number of supporters in that profile at the point it was Last run

Refresh: If you wish you can refresh the profile so it re-queries and updates its count. Some profiles may be set to automatically do this – if you want to know more, read about profiles here

Remove: You can un-attach profiles from your page by clicking on the red minus sign next to the profile

Setting up conditional content

Now you have assigned your profiles, you can start creating different content for different profiles. To do this, edit the block that you want to show different content for.

Text blocks

When you edit the text block, if you look at the top-right you’ll see a new button labelled “All supporters”. This means that what you are seeing is the default content, which will show for supporters coming to the page when the system does not know which profile they are in, e.g. from your website, or if the supporter is not in any of the profiles you have assigned.

If you click on the “All supporters” button, it will list the profiles you have assigned. Choose the one you want to alter the content for and it will load in the same content as you had for “All supporters”.

You can now alter this for that profile.

Save the block and you can go back and edit them as you would normally do. Use the profile button to switch content.

Form blocks

Just in the same way as for text blocks, you can have conditional content form blocks. To alter the content, edit the form block and click the profile button at the top right. You can:

  • alter the label of the form field
  • alter the type of the form field (e.g. one profile could see a text box for the amount, and others a select drop-down giving them pre-selected amounts)
  • alter the default content of the form fields (e.g. have different radio donation amounts for different profiles)

Each form block version has to have the same form fields – you cannot have some form fields available for some but not others. However, you could have a Hidden field for a profile with a default value, for example.

Testing & viewing your conditional content

You can click the preview button (the magnifying glass) to either preview the page as that profile would see it (Preview in browser), or to “Load” the profile into the editor.

More information

We have a tutorial video covering conditional content, which forms part of the Academy training programme:

Notes

  • You can also have conditional content for emails. Click here to learn more.
  • Note the difference between conditional content and split test pages, which randomly show versions of an entire page for testing purposes
  • The URL of the page contains the profile ID when that profile is active. For example:
    CODE
    $body

    In this example, the profile that is active is 15135 and so the page will check whether any “15135” versions of the blocks exist. If they do, it will display them, otherwise it will show the default (rather like how locales work). Because of this, it is possible to “force” a profile in a static link if you wish, for example from your website or Facebook post.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.