Skip to main content
All CollectionsInstalling ConvertFlow
WordPress – How to install ConvertFlow
WordPress – How to install ConvertFlow

How to connect with WordPress, and target by pages, posts & categories

Jonathan Denney avatar
Written by Jonathan Denney
Updated over a year ago

Using the ConvertFlow WordPress plugin (in beta)

Next, upload the plugin to WordPress from Plugins > New.

Then, head to the integration page of your ConvertFlow website to find your API details.

Last, copy and paste your API details into the ConvertFlow WordPress plugin settings page.

Click "Connect" and you should see confirmation that ConvertFlow was installed.

With ConvertFlow connected, 2 new blocks should now be available for WordPress:

1. Your ConvertFlow embedded campaigns


Or, use the AddFunc WordPress plugin

Head to the plugins area of your WordPress site, search for " AddFunc Head & Footer Code", install the plugin, and activate it.

Then, head to  Settings > Head & Footer Code to install your ConvertFlow site code. With your ConvertFlow script copied, paste it into the "Head code" field. Then click "Save". 

ConvertFlow will now start tracking your website visitors, and your campaigns can be displayed.

How to enable the WordPress targeting integration

Regardless of how you install ConvertFlow on your WordPress site, you can enable WordPress targeting options with the targeting integration.

Head to your ConvertFlow website's integrations page, scroll to WordPress and click "Connect".

You'll then be presented with the form that you'll need to submit so ConvertFlow can access your WordPress site's API.

Enter your WordPress site domain name, including http:// or https://. The full URL is required for ConvertFlow to be able to determine whether to establish a secure connection with your site or not.

If your domain has a subdomain, like "www" or "members", make sure to include this too. The easiest way to do this is to copy the base URL directly from your browser while on your site and paste it into ConvertFlow.

Have strong WordPress security?

If you have an extra security layer provided by your hosting provider, or through a plugin, then the WordPress rest API may have been disabled, and it will need to be enabled for the targeting integration to work.

If your WordPress site isn't connecting to ConvertFlow successfully, you've double-checked the URL you're entering, and your site is running 4.7+, it could be that your site firewall is blocking requests from ConvertFlow. You'll need to make sure WordPress rest API is enabled by your security plugin or host (this can be done over the hosting company's support chat). 

Or, if you need to whitelist ConvertFlow, here are the IP addresses ConvertFlow will use:

54.173.229.200
54.175.230.252

How to target your campaigns by post, page, category, and login status

With your WordPress site connected, all of your posts, pages, and categories are known by ConvertFlow, unlocking new targeting options for you to use in your campaigns.

WordPress targeting options include...

  • If visiting WordPress page

  • If NOT visiting WordPress page

  • If visiting Wordpress post

  • If NOT visiting WordPress post

  • If visiting WordPress category

  • If NOT visiting WordPress category

  • If person is logged into WordPress

  • If person is NOT logged into WordPress

When you a select your targeting condition type, you'll then find that you can choose from your posts, pages, and categories from a simple dropdown.

Are your targeting conditions not working?

This might mean your WordPress theme is lacking the post class function, which is how ConvertFlow recognizes categories, tags etc.

Most official WordPress themes have post_class() installed on the body tag of posts and pages.

If you're using a third-party theme, there's a chance this wasn't included, which means ConvertFlow doesn't have a way to tell which category a post belongs to and which tags it has.

To configure this, install the post_class() function on the body tag of your theme's post template - https://developer.wordpress.org/reference/functions/post_class/

Installing area snippets on your WordPress site

ConvertFlow's area snippets let you target embedded campaigns to predefined areas on your website, using the targeting system.

When using the ConvertFlow WordPress plugin, areas can be added to your site using the blocks editor and the "ConvertFlow area" block.

If you're installing areas without the ConvertFlow WordPress plugin, you can do so by using the widgets under Appearance > Widgets. Using the custom HTML widget, you can easily add the area snippet to your website to any widget your WordPress theme enables.

There is also a simple plugin that makes it easy to add any HTML to the top & bottom of WordPress posts and pages.

Using this, you can add areas for your campaigns to display before and after your WordPress posts.

Did this answer your question?