Overview

Overview

#Overview
The Webhooks addon (or 「Zapier addon」) allows you to ping a third party URL when events happen in WP Fusion, similar to WooCommerce』s webhooks. This is advanced functionality, so if you』re not sure if you need it, you probably don』t.
We advise you to keep as much of your automation rules and sequences in your CRM as you can, but sometimes that』s not possible and in those cases this addon can fill the gap.

The available triggers are:

User registered
Profile updated
Tags applied (can specify which tags)
Tags removed (can specify which tags)
Tags modified
Form submitted

The available fields are any fields in the wp_usermeta table, as well as the user』s contact ID and tags.
When using the Form Submitted trigger any data submitted with the form will be included in the webhook payload.
#How it works
When the selected event is triggered, the enabled fields will be extracted from the database and sent to your selected webhook URL.
Note that the only data that can be synced is data attached to the current logged in user in the wp_usermeta table of your database.
#How it works – Form submitted
The Form Submitted trigger is a bit different in that it pings your webhook URL with the same data that WP Fusion has just sent to your connected CRM. This is the only trigger that works with visitors who aren』t logged in to your site.
 
#Supported services
#With Zapier
Using this addon allows you to trigger Zaps when users register on your site, update their profile, or when a tag is applied or removed.
An example use case is someone who is using Ontraport as their primary tool for CRM and marketing automation, but wants to trigger an on-site message in Intercom when a course is completed. For a walkthrough on that scenario, check out our Zapier guide.
Because the data is sent from WordPress to Zapier, the Zaps are processed instantly, which means this tool can be used effectively even with a free Zapier account.
#With Zoho Flow
Zoho Flow can also capture the incoming data and route it across the various Zoho apps. This lets you update invoices, companies, leads, and other objects in Zoho that would normally be inaccessible to WP Fusion.
#With other services
This addon can be used with any service that can capture an incoming webhook, like IFTTT, Automate.io, or even your own custom script or application.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Link Click Tracking

Link Click Tracking

#Overview
WP Fusion』s link click tracking feature lets you apply tags in your CRM or marketing automation tool when links (or other elements) are clicked on your website.
To apply or remove tags when a user visits a specific page on your site, the simplest method is to use our meta box in the page settings to configure the tags to apply / remove.
However, you may want to track engagement with external links, file downloads, or other buttons that don』t qualify as separate pages. You can do so using this feature.
#Setup
First enable the feature from the Advanced section of the general WP Fusion settings tab.
link-tracking
When creating your links, switch into the 「Text」 mode of the editor, and structure your link HTML like the following:
Click Me
When the link is clicked, the tags will automatically be applied to the user.
To remove tags when a link or button is clicked, use the following:
Click Me
#Other Elements
You can also use link click tracking on other elements. For example, to apply a tag when a form is submitted, add the data-apply-tags parameter to the submit button like so:

The data-apply-tags attribute can be added to any HTML element.

#With Elementor Pro
Elementor Pro allows you to specify data attributes for any element, which means WP Fusion』s tracking can be used to track clicks. This setting can be found on the Advanced tab while editing any element.

Just enter data-apply-tags followed by a pipe | and then a comma-separated list of the tags you』d like applied when the element is clicked. For removing tags, use data-remove-tags.
#With Gutenberg
With the Gutenberg editor, we recommend the Block Data Attribute plugin for adding the data-apply-tags attribute to buttons or other blocks.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Oxygen

Oxygen

#Overview
WP Fusion lets you control the visibility of Oxygen components based on a user』s CRM tags. When editing a component, open the Conditions menu, and click Set Conditions to open the conditions modal.

Under the User section, select CRM Tags.

For each condition you can either select Has tag or Does not have tag. You can combine multiple conditions by clicking the Add Condition button.
If Does not have tag is selected, the component will be shown to logged-out users. You can limit visibility to only logged-in users by adding an additional User Logged In condition.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Zapier Guide

Zapier Guide

#Overview
Using this addon with Zapier allows you to trigger Zaps when users register on your site, update their profile, or when a tag is applied or removed.
For an example we』ll set up a workflow that triggers an on-site message in Intercom when someone completes a course.
#Setup
Navigate to Settings » WP Fusion and click on the webhooks tab to access the webhooks list. Click 「Add New」 to create a new webhook.

For the trigger select Tags Applied, and in the tag selection box select the tag that will be applied when the course is completed. For the Post Fields you』ll want to enable at least user_email so the user can be identified in Intercom.
Then head over to Zapier and create a new Zap. For the trigger select Webhooks.


For the trigger type, select Catch Hook, and click Save + Continue.

Zapier will give you a unique URL to use for your webhook. Copy this URL into the Delivery URL field in the webhook settings, and click the Send Test button. Then switch back to Zapier and click 「Ok, I did this」.
On the next page you should see your incoming webhook listed, and you can expand it to see all of the data that was captured. If everything looks right, proceed to the next step.
#Actions
Now that the data is set up to be captured, you can use that data in any Zapier action. Here we』ve created a 「Incoming Message」 action in Intercom, which uses the data from the webhook to target the user and personalize the message.

You can use the 「Insert A Field」 button to insert any dynamic data from the webhook.

Above is another example, sending a direct message in Slack when a webhook has been received. If you use Slack to support your membership community you could use this to automatically congratulate members in a Slack channel when they reach goals on your website.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Site Tracking Scripts

Site Tracking Scripts

#Overview
For your convenience, WP Fusion includes bundled copies of the site tracking scripts for:

ActiveCampaign
AgileCRM
Bento
Drip
Emercury
EngageBay
HubSpot
Infusionsoft
Mautic
and Ontraport

To enable site tracking, check the box on the main WP Fusion settings page, on the General settings tab.

Once enabled, visitors and users will be tracked using each CRM』s tracking methods, and tracking data will appear on contact records in your CRM.
#How it works
#ActiveCampaign
Site tracking data shown in the ActiveCampaign contact record.
In addition to loading the ActiveCampaign site tracking script in the footer of your site, WP Fusion will also identify any logged in users to the tracking script by email address. This also works with auto login links and form auto login.
In cases where a guest (not logged-in) makes a purchase or fills out a form using a supported form plugin, WP Fusion will try to set a cookie wpf_guest, containing the person』s email address.
When this cookie is present, the email address in the cookie will also be passed to the ActiveCampaign site tracking script. This makes it possible to start tracking a site visitor after a guest checkout or form submission, despite them not having a user account on the site,
#AgileCRM
Site tracking data shown in the AgileCRM contact record.
In addition to loading the AgileCRM site tracking script in the footer of your site, WP Fusion will also identify any logged in users to the tracking script by email address. This also works with auto login links and form auto login.
#Bento
With Bento site tracking enabled, you』ll be able to see your visitors pageviews in Bento, as well as initial landing page and geo location.
In addition to loading the Bento site tracking script in the header of your site, WP Fusion will also identify any logged in users to the tracking script by email address.
This also works with auto login links and form auto login.
#Drip
Site tracking data shown in the Drip contact』s Activity Log.
In addition to loading the Drip site tracking script in the footer of your site, WP Fusion will also identify any logged in users to the tracking script by email address. This also works with auto login links and form auto login.
#Emercury
To enable Emercury site tracking, check the box for Site Tracking on the General tab in the WP Fusion settings.
Note that you must be on a Pro or Scale plan with Emercury to use site tracking. If site tracking is not available for your account, WP Fusion will display an error message when you attempt to enable site tracking.
For site tracking to work you need to add your site』s domain inside the site tracking settings of your Emercury account. For more information on how site tracking works with Emercury, see this guide.
If your users are logged in or otherwise identified to WP Fusion (for example via an Auto Login Link) WP Fusion will also pass the user』s email address to the tracking script, which will associate their activity with their corresponding Emercury contact record.
#EngageBay
To enable EngageBay』s site tracking, first check the box for Site Tracking in the WP Fusion settings.

You will need your JavaScript API Key, which can be found in your EngageBay account.
You can find your EngageBay JavaScript API key in your account under Admin Settings » API and Tracking Code
Once enabled, WP Fusion will output the EngageBay tracking code in the header of every page of your site.
If your users are logged in or otherwise identified to WP Fusion (for example via an Auto Login Link) WP Fusion will also pass the user』s email address to the tracking script, which will associate their activity with their corresponding EngageBay contact record.
#HubSpot
If site tracking is enabled for HubSpot, WP Fusion will load the site tracking scripts into the header of your site. WP Fusion will also identify any logged in users to the tracking script, by email address.
If a guest visitor submits a form or makes a checkout, WP Fusion will also identify the guest to the tracking script by email address, which allows the anonymous tracking data to be merged retroactively with the guest』s contact record.
Site tracking data is shown on a contact』s Activity stream in HubSpot, including pages visited and forms submitted.
The visitor』s page views are tracked and recorded up to the time of submitting the lead form.
HubSpot』s tracking scripts are a little more sophisticated than our other supported CRMs. They will automatically detect when a form is on a page, and try to sync the submitted form values to HubSpot.
Submitted forms on your website are automatically displayed on the contact』s Activity stream.
This generally works quite well, but can sometimes cause problems. For example the WooCommerce 「Billing Email」 can get synced to HubSpot and overwrite the customer』s account email.
If you encounter unexpected property changes in HubSpot, try deactivating site tracking.
Note: If you』re using the HubSpot for WordPress plugin, then the tracking scripts are already loaded on your site. In that case you should keep site tracking disabled in WP Fusion.
#Infusionsoft
Site tracking data shown in the Web Profile tab for an Infusionsoft contact.
#Mautic
Mautic site tracking is a little more complicated than site tracking with our other supported CRMs.
Set up properly it can be very effective, but it can also cause problems with misidentified contacts, or contact records getting merged.
Note: Mautic site tracking will not work if you are currently logged into Mautic as a user with the same email address as your WordPress user email. To test Mautic site tracking always use an incognito browser window.
WP Fusion』s two options for site tracking with Mautic
WP Fusion includes two options for Mautic site tracking:

Site Tracking: Enabling this option includes the Mautic tracking script in the footer of your page and sends a mt('send', 'pageview'); event with each page view. This is the same as if you were using the WP Mautic plugin, or had added the tracking code manually.
Advanced Site Tracking: Enabling this option activates some additional tracking methods unique to WP Fusion. When Advanced Site Tracking is active:

If an anonymous visitor on your site is being tracked in Mautic, and later registers an account, submits a form, or makes a purchase, WP Fusion will merge the anonymous tracking data with the new contact record. This gives you a more complete picture of the visitor』s history on your site before they provided an email address.
If a user is logged in to your site, WP Fusion will send a mt('send', 'pageview', {"email":"EMAILADDRESS"} ); event to Mautic』s tracking script, to track pageviews for logged in users in cases where they default Mautic tracking can』t properly identify them.

Where you need to be careful with Advanced Site Tracking is caching.
If [email protected] is logged into your site, and the Mautic tracking script is output to the footer of your page with Jane』s email address, then this could become cached.
If [email protected] later visits the same cached page, the tracking script would send a mt('send', 'pageview', {"email":"[email protected]"} ); event.
This would update Steve』s contact ID in Mautic with Jane』s email. Since the email address field in Mautic must be unique, this would merge the two contact records and delete Steve』s data and tags.
With Mautic site tracking enabled, anonymous visitors are tracked in Mautic.
When a visitor registers an account, makes a purchase, or submits a form, their tracking data is merged into the new contact record (using Advanced Site Tracking).
#Developers
Site tracking will automatically be disabled when WP Fusion is set to Staging Mode (on the Advanced settings tab).
If needed you can also conditionally load the site tracking scripts via the wpf_get_setting_site_tracking filter.
For example, to disable site tracking for logged in administrators:
function disable_site_tracking() {

if ( current_user_can( 'manage_options' ) ) {
add_filter( 'wpf_get_setting_site_tracking', '__return_false' );
}

}

add_action( 'init', 'disable_site_tracking' );
Or to disable site tracking on a specific page:
function disable_site_tracking() {

if ( is_page( 'login' ) ) {
add_filter( 'wpf_get_setting_site_tracking', '__return_false' );
}

}

add_action( 'init', 'disable_site_tracking' );

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Auto Login

Auto Login

#Overview
WP Fusion』s auto-login system can load the CRM tags and meta data for a contact record into a temporary WordPress user account. The site visitor is then tracked with a cookie.
This allows you to personalize site content, pre-fill forms, and track activity (by applying tags) even if the contact doesn』t have a WordPress account.
The auto-login process can either be triggered via a link, or via a form submission.
Note: This feature does not work properly on WP Engine or other hosts that don』t let you edit your site』s caching settings.
#Auto Login Links
Auto login links can be used in an email to grant access to restricted content on your site without requiring a user to log in. You can even grant access to contacts in your CRM that don』t have user accounts on your site.
Keep in mind that the user will only be logged in for the purposes of WP Fusion』s content restriction and activity tracking features. For security reasons, users will not be able to access or edit their account details, purchase history, or any other sensitive information. For that they will need to log into your site using their username and password. All other plugins will see the visitor as a guest.
#Usage
To use this feature, first enable it from the Advanced section of the WP Fusion general settings tab.

You can now log a user into your site by passing a contact ID in any URL pointed at your site, for example:
http://mysite.com/my-special-content/?cid=1234
This sets a cookie and creates a temporary WordPress user with that contact』s tags and other information from your CRM. Any protected content will be accessible if the contact has the correct tags. You can also apply tags and track activity as if the user was logged in.
You can also use WP Fusion』s user meta shortcodes to display contact data from your CRM.
#Personalization tags
Here are some of the personalization tags for our more popular CRM integrations. This list will continue to be updated:

ActiveCampaign: http://mysite.com/?cid=%CONTACTID%
AgileCRM: http://mysite.com/?cid={{id}}
ConvertKit: http://mysite.com/?cid={{ subscriber.id }}
Drip: http://mysite.com/?cid={{ subscriber.id }}
FluentCRM: http://mysite.com/?cid={{contact.id}}
Gist: not supported by Gist
Groundhogg: http://mysite.com/?cid={id}
HubSpot: http://mysite.com/?cid={{ contact.email }}
Infusionsoft / Keap: http://mysite.com/?cid=~Contact.Id~
Mailchimp: http://mysite.com/?cid=*|EMAIL|*
MailerLite: http://mysite.com/?cid={$email}
Mautic: http://mysite.com/?cid={contactfield=id}
NationBuilder: http://mysite.com/?cid={{recipient.id}}
Ontraport: http://mysite.com/?cid=[Contact ID]
Sendinblue: http://mysite.com/?cid={{ contact.EMAIL }}
Zoho: http://mysite.com/?cid=${Contacts.Contact Id}

For other CRMs you can find the merge field for the contact ID from their merge fields documentation.
#Set Current User
By default auto-logged in users will only be able to access content protected by WP Fusion, and contact data can only be displayed using WP Fusion』s shortcodes.
You can enable Set Current User to have WP Fusion set the $current_user global in WordPress, so other plugins will be tricked into treating the user as logged-in as well.
This works well for pre-filling forms (in plugins like Gravity Forms or Advanced Custom Fields) with data from the CRM contact record, allowing you to create profile update forms or subscription preferences forms for your mailing list subscribers.
However this can cause problems with membership plugins (like BuddyBoss) and gamification plugins as they try to trigger notifications or achievements for a non-existent user, and may cause your site to crash when the auto-login link is visited.
If you get a white screen or an error message when visiting an auto-login link, turning off Set Current User will likely fix the error.
#Form Auto Login
You can also start an auto-login session when a form is submitted with any one of our supported form plugins.
This is the same as if the visitor had just followed an auto-login link— a cookie is set and then you can customize the site appearance based on the tags and meta data on their contact record.

To enable this, check the box for Form Auto Login from the Advanced settings tab.
#Ending auto-login sessions
WP Fusion will attempt to end the auto login session in several situations to prevent unexpected behavior on your site:

When a user logs into the site with a username and password
When a visitor reaches a page that contains 「login」 in the URL
When a visitor reaches a page that contains 「register」 in the URL
When a visitor reaches a page that contains 「checkout」 in the URL

However you may also want to force the auto-login session to end at a different time, for example when a form is submitted. You can do this by appending ?wpf-end-auto-login=true to any URL.
You can also achieve this in PHP by calling wp_fusion()->auto_login->end_auto_login();
#Troubleshooting Auto Login
The auto login system is still considered experimental and we can』t guarantee that it will work with all plugins.
If you』re using an auto login link and it doesn』t seem to be working, the first thing to check is if the cookie has been set for the auto login session. You can check your browser』s cookie storage to see if the wpf_contact cookie is being set. In Chrome this is found in the developer console under Application » Cookies:

If the wpf_contact cookie isn』t set, then the auto login URL wasn』t recognized. You should make sure that you』re using a real contact ID in your auto login URL, and that Auto Login is turned on in the WP Fusion settings.
#Caching
Because auto-login links are visited by guests (people who aren』t logged in), making auto-login links work with caching requires some extra attention.
For starters, make sure that any URLs with cid= in them are excluded from cache. Also add a cookie based cache exclusion for the wpf_contact cookie.
Note that URLs with UTM parameters (from Google Analytics) force-enable caching on some hosts. In many cases https://mysite.com/?cid=123 will work, but https://mysite.com/?utm_campaign=FallNewsletter&cid=123 will not, because the utm_campaign parameter triggers caching.
Getting around that is different for every host. For example with Cloudways we』ve had to:

In the cache exclusion settings in the Breeze plugin, put in a URL exclusion for the landing page being used with auto-login
In the Varnish settings in Cloudways, put in a cache exclusion for the landing page being used with auto-login
In the Varnish settings in Cloudways, put in a cache exclusion for the wpf_contact cookie.

#Debug Mode
As of WP Fusion v3.37.12, you can enable Auto Login Debug Mode from the Advanced tab in the WP Fusion settings.

When enabled, details about the current auto-login session will be output to the HTML comments in the header of your site.
You can use this to troubleshoot issues for a particular auto-login user, for example missing or malformed metadata or tags. This will also show if the wpf_contact cookie isn』t being set, for example due to caching.
#Developer resources
There are a few filters that allow you to modify the auto-login process.
#Using an alternate auto-login query variable
Instead of using ?cid= in your URL, you may want to use another variable,  for example if you』re already passing the contact』s ID to a different plugin. You can register an additional custom query variable using the wpf_auto_login_query_var filter.
For example to share the contact ID parameter with RightMessage, you』d use:
function alt_auto_login_var( $var ) {
return 'rm_ac';
}
add_filter( 'wpf_auto_login_query_var', 'alt_auto_login_var' );
#Pass auto-login data to other scripts
WP Fusion includes a function, wpf_get_current_user(), which works the same as the wp_get_current_user()  function, except that it also supports auto-login sessions. This can be used to pass data from an auto-login session to a 3rd party tracking script.
Below are two examples, one for Oribi』s site tracking, and one for Smartlook』s site tracking.
function custom_wpf_tracking() {

if ( ! function_exists( 'wp_fusion' ) || ! wpf_is_user_logged_in() ) {
return; // WP Fusion needs to be active and the user needs to be identified.
}

$user = wpf_get_current_user(); // Get the details about the current user. This lets you use the email via $user->user_email
$contact_id = wpf_get_contact_id(); // Or, optionally, you can use the contact ID for tracking.

?>

ORIBI.api('setUserEmail', 'user_email; ?>' );

smartlook( 'identify', '' );


user->has_tag( 'Payment Failed' ) ) {
$end = true;
}

return $end;
}

add_filter( 'wpf_end_auto_login', 'my_end_auto_login', 10, 2 );
There is also a helper filter which allows you to end a session based on a partial URL match, wpf_end_auto_login_request_uris:
function my_end_auto_login_uri( $request_uris ) {

$request_uris[] = 'my-page-slug';

return $request_uris;
}

add_filter( 'wpf_end_auto_login_request_uris', 'my_end_auto_login_uri' );
In this example, if the visitor lands on https://mysite.com/my-page-slug/ (or any URL with my-page-slug in it) the session will end.
#Skipping an auto-login session
You can skip an auto-login session on a single page via the wpf_skip_auto_login filter. The session will be resumed once the visitor navigates to another page.
function my_skip_auto_login( $skip, $contact_data ) {

if ( is_page( 'my-custom-form' ) ) {
$skip = true;
}

return $skip;
}

add_filter( 'wpf_skip_auto_login', 'my_skip_auto_login', 10, 2 );
There is also a helper filter which allows you to skip the session based on a partial URL match, wpf_skip_auto_login_request_uris:
function my_skip_auto_login_uri( $request_uris ) {

$request_uris[] = 'my-page-slug';

return $request_uris;
}

add_filter( 'wpf_skip_auto_login_request_uris', 'my_skip_auto_login_uri' );
In this example, if the visitor lands on https://mysite.com/my-page-slug/ (or any URL with my-page-slug in it) the session will skipped on that page.
#Making auto-login more secure
The basic auto-login implementation with just the cid= parameter is the easiest to set up and the most reliable. However this does mean that a visitor could cycle through random contact IDs in the URL, and potentially gain access to another contact』s content or details.
You can further secure the URL by adding a second parameter that has to pass. In this example, the auto-login URL contains an additional email= parameter. If the email doesn』t match the email address on the contact record in the CRM, the auto-login session.
To work, the URL would need to be formatted like https://mysite.com/?cid={contact_id}&email={email_address}
function verify_wpf_auto_login( $end, $contact_data ) {

if ( isset( $_GET['cid'] ) ) {

$contact = wp_fusion()->crm->load_contact( intval( $_GET['cid'] ) );

if ( is_wp_error( $contact ) ) {
return true;
}

// If there's no &email= parameter in the URL, or the email doesn't match
// the email in the database, end the auto login session

if ( ! isset( $_GET['email'] ) ) {
return true;
}

if ( urldecode( $_GET['email'] ) != $contact['user_email'] ) {
return true;
}
}

return $end;

}

add_filter( 'wpf_end_auto_login', 'verify_wpf_auto_login', 10, 2 );

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

ActiveCampaign Webhooks

ActiveCampaign Webhooks

#Overview
You can use webhooks in ActiveCampaign to send data back to your WordPress site using WP Fusion. Using webhooks you can create new users on your WordPress site based on automations in ActiveCampaign, or update existing users』 meta data and tags.
Note: As of March 2021, SiteGround』s anti-bot captcha system automatically blocks all incoming ActiveCampaign webhooks. If webhooks aren』t working on SiteGround, contact SiteGround support and ask for the bot protection to be turned off for your account.
Having trouble receiving webhooks? Check out our troubleshooting guide.
There are two ways to manage webhooks in ActiveCampaign, either via an Automation or in the Developer Settings.
#Automation Method
(Recommended) The automation method is best if you need to send a webhook to create or update a WordPress user as part of a specific process. For example:

Tag 「Website Access」 is added
Send webhook to create WordPress user
Send welcome email
Wait 3 days
Apply tag 「Unlock Course Two」
Send webhook to update tags

Using a webhook in an automation lets you easily visualize the entire automation flow, and see where individual contacts are in the process.

You』ll also be able to visualize where a single contact is in the automation, when the webhook was sent, and whether or not it was received successfully. Using webhooks in automations gives you a lot more control and better reporting than using Global Webhooks (see below).
To use webhooks in automations first create an automation and add a webhook to it, like in the example above. You have three options for the webhook, update, update_tags and add (explained below). For each you will need to supply your access key, which can be obtained from the main panel in your WP Fusion settings.
ac-webhook2
When the contact reaches the webhook step in the automation ActiveCampain will notify WP Fusion to load the contact』s data from ActiveCampaign.
#A note on 「failed」 webhooks
When viewing automation reports you may see your webhooks being marked as 「failed」 by ActiveCampaign, like in the screenshot below.

This does not necessarily mean that the webhook failed. ActiveCampaign will mark any webhook as failed if your server takes longer than 5 seconds to respond.
Since there』s a fair deal of processing involved in receiving a webhook (see some average timings here), it』s not uncommon for your server to take longer than 5 seconds, especially with shared hosting.
For a definitive answer as to whether the webhook was processed, you can check the WP Fusion logs.
If you』d prefer not to see the Failed symbol in the automation reports, you can also set your webhooks to run asynchronously.
This does not speed up the time required to process the webhook, or make webhooks more reliable, it just means that WP Fusion will immediately respond to ActiveCampaign that every webhook was successful, and then actually process the webhook a few seconds later.
#Developer Settings Method
(Advanced) You can also set up webhooks which are global to your account. This is best if you』re manually editing contact records in ActiveCampaign (outside of an automation) and need these changes synced to WordPress.
Note: It』s not recommended to set up global webhooks with the add method, as then every contact in ActiveCampaign will be given a WordPress user account.
To set up a webhook navigate to Developer » Webhooks in your ActiveCampaign admin settings, and click Add to create a new webhook.

Under Type select the events that should trigger the webhook.

For Initialize From, select which types of events should trigger the webhook. ActiveCampaign has a description of the types here.
You shouldn』t enable By the API as this will send a webhook after WP Fusion sends an API call to apply a tag, which is redundant.
Note that, despite the descriptions in the ActiveCampaign help portal, we have tested and found that tags applied in automations will trigger a global webhook if it is set to By an admin user. If you』re experiencing unexpected webhooks or a high volume of webhooks, it』s recommended to disable that trigger.
Help us our by voting on this feature request with ActiveCampaign to create a webhook trigger specific to manual contact edits.
Keep in mind that, because these webhooks are global to your ActiveCampaign account, bulk editing contacts will trigger webhooks to be sent to your site for every edited contact, which may make your WordPress site temporarily unstable.
Note: If you』ve set up global webhooks with the update or update_tags method it』s not necessary to also include those same webhooks in automations.
#Webhook URL parameters
You can format your webhook URL in a few different ways to customize the behavior:
#To update a user』s tags
To update an existing WordPress user』s tags from the contact record, the URL for the webhook should look like the following:
http://mydomain.com/?wpf_action=update_tags&access_key=YOURACCESSKEY
#To update a user』s tags and meta data
To update a user』s tags and pull any new meta data from ActiveCampaign for that contact, the URL for the webhook should look like the following:
http://mydomain.com/?wpf_action=update&access_key=YOURACCESSKEY
#Create a new user
To create a new user, use the following URL:
http://mydomain.com/?wpf_action=add&access_key=YOURACCESSKEY
You can also specify additional parameters in user creation. For example, to send the user a welcome email containing a link to log in on your site, use the following:
http://mydomain.com/?wpf_action=add&access_key=YOURACCESSKEY&send_notification=true
You can also specify a specific user role to be assigned to the new user. For example, to set the new user to the 「customer」 role, use the following:
http://mydomain.com/?wpf_action=add&access_key=YOURACCESSKEY&role=customer
Note that you have to have registered a 「customer」 role on your site for this to work. By default users will be assigned the role of 「subscriber」.
The add method will update a user if an existing user already exists. It will not create a duplicate user.
Note: By default, user accounts will be created with their email address as the username and a randomly generated password. However, if you have created a custom username field and password field in your ActiveCampaign application, and enabled these fields in WP Fusion for sync with user_login and user_pass on your website, the new users will be given the usernames and passwords stored in their ActiveCampaign contact record.
#User passwords
New user accounts will be created with an automatically generated password. If you』d like to use this password in your email marketing, you can send the password back to ActiveCampaign after it has been generated.
In the Webhooks section of the General settings tab, check the box for Return Password, and select a field in ActiveCampaign where the password should be stored.

After a new user is created, their automatically generated password will now be saved back to their contact record, and you can use a merge field to include it in an email. The username will be the contact』s email address.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Switching CRMs

Switching CRMs

#Overview
The time may come when you need to move from one marketing automation platform to another. Thankfully WP Fusion makes this pretty easy. Here are the steps:
#1. Move your data
To ensure that no data gets lost in the transfer, the best way to move your contacts over is to do an export of all contacts from your old CRM and import that data into the new CRM.
Make sure that your contacts』 tags get transferred over, as WP Fusion can』t migrate contact tags between platforms.
#2. Clear out linked tags
If you』re using 「Linked tags」 to trigger automated enrollments into courses or membership levels, it works best if you remove the linked tags before switching CRMs.
Since every user』s tags will be updated during the migration, this could cause people to temporarily be removed from courses or membership levels. After you』ve connected to your new CRM you can go back in and restore the tag link settings.
#3. Reset WP Fusion
Go to Settings » WP Fusion » Advanced and check the box at the bottom for Reset Settings. Save the settings.
#4. Connect
Select your new CRM from the dropdown, enter your API credentials, and click Test Connection. Once it』s connected save the settings.
WP Fusion will continue to work in the background on matching up your existing users with their new contact IDs in your new CRM, and loading their tags.
#5. Update your settings
The only settings that have been completely reset are the main WP Fusion settings. You』ll want to go through those and re-associate any WordPress fields with custom fields in your new CRM, and generally make sure everything is configured how you』d like.
If you are using any of our form integrations, like Gravity Forms, make sure you edit your form feeds to use the new custom fields as well.
The next part depends on what you』re switching from, and what you』re switching to, and has to do with whether the CRM supports creating new tags 「on the fly」.

For example in switching from ActiveCampaign to Drip, no additional configuration is required. Your products, membership levels, and courses will all continue to use the same tags from ActiveCampaign.
If you』re switching from a CRM with numeric tag IDs, like Infusionsoft or Ontraport, to one without, like Drip, then you will need to go through and update all of your tagging settings across all of your content. Until you do you will continue to see numeric IDs applied as tags instead of the new tag names. To troubleshoot any mystery tags being applied we recommend turning on WP Fusion』s activity logs.
If you』re switching between CRMs with numeric tag IDs, like from Infusionsoft to Ontraport, you will also need to update all your tagging settings.

For a list of platforms that support 「Dynamic Tags」, see the compatibility table.
Switching between any two platforms that support Dynamic Tags does not require any additional reconfiguring of your products or access rules— all of your tags will copy over automatically.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Batch Operations / Exporting Data

Batch Operations / Exporting Data

#Overview
WP Fusion includes a series of tools that let you export data in bulk to your CRM. These are found under Settings » WP Fusion » Advanced » Batch Operations.

The options available will depend on which plugins you have active. For each operation you can hover over the tooltip indicator to get a description of what data will be synced or modified.

Note: These operations can potentially modify thousands of records in both WordPress and your CRM, and they are irreversible. It』s always recommended to test with a single record before running a batch operation— for example doing a test checkout before exporting orders, or a test registration before exporting users.

#When to use a batch operation
Just because WP Fusion can export a large amount of data to your CRM doesn』t mean it』s always the best tool for the job. WP Fusion needs to respect the API limits of your connected CRM, as well as the resource limits of your server.
For example, to run a Push User Meta batch operation to sync 30,000 users』 metadata with Ontraport would take about 28 hours to process.
As an alternative, you could use a plugin like WP All Export to export all of your user data to a .csv, and upload it into the CRM in only a few minutes.
The batch operations are best for syncing data that can』t be easily exported any other way, for example applying tags based on MemberPress subscription statuses, or exporting WooCommerce orders.
#Usage
To run a batch operation, select the operation you』d like to perform from the list of radio buttons and then click Create Background Task. A status indicator will appear at the top of the page showing the number of records to be processed and the number remaining.

Some notes:

You can leave the page while the background worker runs and it will continue to process the queue in the background.
If the background process gets stuck you can refresh the page and it will pick up where it left off.
It』s recommended to turn on the activity logs so you can see what data is being sent or loaded, as well as any potential errors.

Note on speed: Most CRMs have some kind of API limits with regards to the number of API calls you can make in a period of time. WP Fusion pauses in between each step in the background process to avoid exceeding these API limits. How long the pause is depends on your connected CRM.
Depending on the number of records you are processing, this can cause the background worker to take several hours (or even days) to complete. For example exporting 30,000 WooCommerce orders to Drip would take about 18 hours to fully process.

#Skip already processed
In some cases, you may be asked whether you』d like to Skip already processed records.
By default the batch exporter will not export the same order to your CRM twice.
By default, WP Fusion will not export an order, payment, or form entry to your CRM if it』s already been successfully exported. This is to prevent creating duplicate records.
If you want to go ahead and create duplicate records anyway (for example after switching CRMs or accounts), you can uncheck the Skip already processed box before clicking the start button. This will cause WP Fusion to export all orders, regardless of whether or not they were synced previously.
#Core methods
These operations are part of WP Fusion core and aren』t tied to any particular plugin integration. They are:
#Resync Contact IDs
Looks up every WordPress user by email address in your CRM, and updates their cached contact ID. This does not modify any tags or other data, or trigger automated enrollments.
When to use it: If the cached contact IDs for your WordPress users have gotten out of sync with the contact records in your CRM, this will update that cache, so profile updates and new tags get applied to the correct contact record.
This operation is sometimes preferable to Resync Contact IDs and Tags because if you』re using linked tags / auto-enrollment tags into courses or membership levels, you may not want to modify any tags until you』ve confirmed that every user is linked to the correct contact record.
#Resync Tags
Loads updated tags from your CRM for all WordPress users who already have a saved contact ID. This also triggers any automated enrollments via linked tags.
When to use it: If you』ve modified a lot of tags on a lot of contacts in your CRM (or deleted tags), this operation will bring the tags cached in WordPress for your users up to date with what』s in your CRM. This operation is faster than Resync Contact IDs and Tags because it doesn』t need to first confirm the contact』s email address.
Also, if you』ve recently changed an auto-enrollment tag on a course or membership (for example with a LearnDash course), you may want to update your users automated enrollments based on their current CRM tags. Running the Resync Tags operation will trigger any automated enrollments (and un-enrollments) when the tags are loaded from your CRM.
#Resync Contact IDs and Tags
All WordPress users will have their contact IDs checked / updated based on email address and tags will be loaded from their CRM contact record. This also triggers any automated enrollments via linked tags.
This operation is the same as running Resync Contact IDs and Resync Tags, it just does both at the same time.
When to use it: When a user registers in WordPress, WP Fusion stores their CRM contact ID on your site so that future updates can properly be synced. But if you manually merge a bunch of contacts (for example to remove duplicates), it』s possible that these IDs will no longer be accurate. Running a Resync Contact IDs and Tags operation ensures WP Fusion has all of your WordPress users linked to the correct contact record and has the latest copy of their tags.
#Export Users
All WordPress users without a matching CRM contact record will be exported as new contacts. Any fields configured on the Contact Fields tab will be synced. Any tags specified for Assign Tags on the General settings tab will be applied.
When to use it: If you』re just setting up WP Fusion for the first time, you may have WordPress users that aren』t already in your CRM or marketing automation tool. This tool lets you export those users.
#Apply registration tags
On the General tab in the WP Fusion settings, there』s an Assign Tags option that lets you specify tags to be applied in your CRM when a user registers a new WordPress user account.

These tags are only applied to new user registrations, but if you want to retroactively apply the same tags to every user already registered on the site, you can run the Apply registration tags operation.
When to use it: This operation is useful if you』re trying to reconcile the counts between users on your site and contact records in your CRM. By applying the same tag to every user on your site, you can easily see how many records are missing from your CRM.
#Push User Meta
All WordPress users with a contact record will have their meta data pushed to your CRM, overriding any data on the contact record with the values from WordPress. Any fields enabled on the Contact Fields tab will be synced.
When to use it: This is most commonly used when you』ve just enabled a new field for sync (for example User ID, or Date Registered), and need to export the values from that field to existing contact records in your CRM.
#Pull User Meta
All WordPress users with a contact record will have their meta data loaded from your CRM, overriding any data in their user record with the values from their contact record. Any fields enabled on the Contact Fields tab will be loaded.
When to use it: This operation would be used when you』ve just enabled a new WordPress field for sync with a custom field in your CRM that already contained data. This operation will load that custom field data into WordPress so it can then be displayed with a shortcode or used by other plugins.
#Troubleshooting
The background worker is a complex process. It』s designed to work across all hosting environments, without affecting the speed or stability of your site.
While it』s generally very reliable, we have encountered issues with both caching and security plugins. The most common issue is that it will process a single batch of records (20 or so) and then not proceed to the next batch until the page is reloaded.
To aid in troubleshooting the background worker, WP Fusion does a status check on it every 5 seconds, and outputs some status information to the JavaScript console in your browser.

This will output the total list of items in the queue, as well as information about the state of the process in terms of previous action, next action, and resource utilization.
Some things to note are:

Most servers have a max_execution_time of 30 seconds for PHP scripts. To get around this, the background worker will attempt to restart itself when the total_time value exceeds 20 (seconds). However, if the time_last_step value is greater than 10 (seconds), this could mean that the 30 second max_execution_time gets exceeded and the process times out.This most commonly happens on slower hosts when exporting WooCommerce orders, using the Enhanced Ecommerce addon. The process of creating a contact record, applying tags, creating products, registering an invoice, and adding the products to the invoice can take a long time for each order. You can speed up this process by first running an Export Users operation before exporting your orders. Since the contact records will already exist in your CRM, this reduces the time required to process each order.
WP Fusion tries to detect the available memory on your host and won』t let the background worker exceed 80% of available memory. However sometimes it』s not able to properly detect the available memory, and so memory_percent shows at 100% and the process prevents itself from running. You can disable this check by returning false from the wpf_batch_memory_exceeded filter.
Because WP Fusion makes sustained requests to admin-ajax.php over a long period of time, it can sometimes get blocked by security plugins. If you notice the batch status isn』t updating, it』s possible the background request is getting blocked. To see if that』s happening you can check your site』s access logs for any traffic to /wp-admin/admin-ajax.php?action=wpf_background_process is being blocked with a 403 (Unauthorized) status. If you』re using WordFence you can also put the plugin into Learning Mode before starting the batch operation to train it to allow this kind of traffic.

#Rate limiting
Most CRMs have some sort of API rate limiting. For example

ActiveCampaign: 5 requests per second
Drip: 3600 requests per hour
Infusionsoft: 1500 requests per minute
Ontraport: 3 requests per second
Zoho: 15000 requests per day

During batch operations it』s possible to hit these limits, after which you』ll begin to see error messages in the WP Fusion logs.
Because most CRMs reset their rate limiting every 60 seconds, WP Fusion does not cancel a batch operation when it it』s a rate-limiting error, it will continue to try to export data, and record errors as applicable.
With CRMs that have lower rate limits (such as Drip), WP Fusion artificially slows down any batch operations to avoid hitting any API limits. That is achieved using the wpf_batch_sleep_time filter. Returning a number from that filter causes WP Fusion to sleep() for the specified number of seconds before moving on to the next task.
For example, to add a one second pause between each batch step:
add_filter( 'wpf_batch_sleep_time', function() {
return 1;
});

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No

Agile CRM Webhooks

Agile CRM Webhooks

#Overview
You can use webhooks in Agile CRM to send data back to your WordPress site using WP Fusion. Using webhooks you can create new users on your WordPress site based on rules in Agile CRM, or update existing users』 meta data and tags.
There are two ways to sync data between AgileCRM and WP Fusion. Method One is available on all plans. Method Two is available with Enterprise plans, but not the lower pricing tiers.
Having trouble receiving webhooks? Check out our troubleshooting guide.
#Method One
In a new or existing campaign, add a JSON IO item to any campaign. This could be triggered by a tag being applied, or part of a larger sequence.

Click on the JSON IO item and in the window that pops up, configure the parameters like in the screenshot below. Replace the URL field with the URL to the home page of your site, and put your access key (from the main page of the WP Fusion settings) in the access_key field.

 
#Method Two
Agile CRM also supports an alternate method of sending webhooks that doesn』t require setting up a campaign sequence. Using this method, WP Fusion will pull the latest data from Agile CRM any time a contact』s details are updated, or a tag is added/removed. For more information on this method, see Agile CRM』s documentation.
To use this method with WP Fusion, create a new webhook and set the URL following the example below.

The URL should be in the format:
http://yourwebsite.com/?wpf_action=update&access_key=YOURACCESSKEY
Make sure to select 「Contact」 as the module, and replace ACCESSKEY in the URL with your unique access key (visible on the WP Fusion settings page). Once the webhook is enabled, any changes to contacts in Agile CRM will be reflected on your site immediately.
 
#To update a user』s tags
To update an existing WordPress user』s tags from the contact record, the URL for the webhook should look like the following:
http://mydomain.com/?wpf_action=update_tags&access_key=YOURACCESSKEY
 
#To update a user』s tags and meta data
To update a user』s tags and pull any new meta data from AgileCRM for that contact, the URL for the webhook should look like the following:
http://mydomain.com/?wpf_action=update&access_key=YOURACCESSKEY
 
#Create a new user
To create a new user, set wpf_action to add.
You can also specify additional parameters in user creation. For example, to send the user a welcome email containing a link to log in on your site, add a parameter send_notification and set it to true.
You can also specify a specific user role to be assigned to the new user, by adding a role parameter. For example, to set the new user to the 「customer」 role, set role to customer.
Note that you have to have registered a 「customer」 role on your site for this to work. By default users will be assigned the role of 「subscriber」.
The add method will update a user if an existing user already exists. It will not create a duplicate user.
 
#Update an existing record only.
If you only want to update an existing contact record to pull any new data from Agile CRM for that contact but NOT create a new user in WordPress, set wpf_action to update.
Note: By default, user accounts will be created with their email address as the username and a randomly generated password. However, if you have created a custom username field and password field in your Agile CRM application, and enabled these fields in WP Fusion for sync with user_login and user_pass on your website, the new users will be given the usernames and passwords stored in their Agile CRM contact record.
#User passwords
New user accounts will be created with an automatically generated password. If you』d like to use this password in your email marketing, you can send the password back to Infusionsoft after it has been generated.
In the Webhooks section of the General settings tab, check the box for Return Password, and select a field in Agile CRM where the password should be stored.

After a new user is created, their automatically generated password will now be saved back to their contact record, and you can use a merge field to include it in an email. The username will be the contact』s email address.

#Was this helpful?

Let us know if you liked the post. That』s the only way we can improve.

Yes

No