Contact Activity Hooks
FluentCRM Core IntermediateThese action hooks fire when contacts interact with emails, links, and subscription preferences.
Email Opens
fluent_crm/email_opened
This action fires when a tracked contact opens an email (first open only).
Parameters
$campaignEmailCampaignEmail Model
Usage:
add_action('fluent_crm/email_opened', function($campaignEmail) {
// Email was opened by a tracked contact
$subscriber = $campaignEmail->subscriber;
});Source: app/Hooks/Handlers/ExternalPages.php, app/Hooks/Handlers/RedirectionHandler.php
fluent_crm/email_opened_anonymously
This action fires when an email open is detected but the contact is anonymous (tracking pixel loaded without identifiable contact).
Parameters
$emailCampaignEmail Model
Usage:
add_action('fluent_crm/email_opened_anonymously', function($email) {
// Anonymous email open detected
});Source: app/Hooks/Handlers/ExternalPages.php
Link Clicks
fluent_crm/email_url_clicked
This action runs when a tracked contact clicks a link from an email.
Parameters
$campaignEmailCampaignEmail Model$urlDataObject - URL tracking data
Usage:
add_action('fluent_crm/email_url_clicked', function($campaignEmail, $urlData) {
// Do your stuff here
}, 10, 2);Source: app/Hooks/Handlers/RedirectionHandler.php
fluent_crm/anonymous_email_url_clicked
This action fires when a URL in an email is clicked but the contact is anonymous.
Parameters
$urlstring - the clicked URL$campaignCampaign Model$campaignEmailCampaignEmail Model
Usage:
add_action('fluent_crm/anonymous_email_url_clicked', function($url, $campaign, $campaignEmail) {
// Anonymous click tracking
}, 10, 3);Source: app/Hooks/Handlers/RedirectionHandler.php
fluencrm_benchmark_link_clicked
This action runs when a benchmark link is clicked.
Note: The typo in the hook name (
fluencrminstead offluentcrm) is intentional — this is how it exists in the source code.
Parameters
$benchmarkLinkIdINT - Benchmark ID$subscriberSubscriber Model or Null if no contact found
Usage:
add_action('fluencrm_benchmark_link_clicked', function($benchmarkLinkId, $subscriber) {
// Do your stuff here
}, 10, 2);Source: app/Hooks/Handlers/ExternalPages.php, app/Hooks/Handlers/RedirectionHandler.php
Smart Links
fluentcrm_smartlink_clicked_direct
This action fires when a contact clicks a smart link via email redirect tracking. This hook fires after the associated tags and lists actions have been processed.
Parameters
$slugstring - the smart link slug$subscriberSubscriber Model$campaignEmailCampaignEmail Model
Usage:
add_action('fluentcrm_smartlink_clicked_direct', function($slug, $subscriber, $campaignEmail) {
// Smart link was clicked via tracked email
}, 10, 3);Source: app/Hooks/Handlers/RedirectionHandler.php
fluentcrm_smartlink_clicked
This action fires when a smart link is clicked directly on an external page (not through email tracking).
Parameters
$slugstring - the smart link slug
Usage:
add_action('fluentcrm_smartlink_clicked', function($slug) {
// Smart link was clicked on an external page
});Source: app/Hooks/Handlers/ExternalPages.php
fluent_crm/smart_link_verified
This action fires when a secure smart link is verified (the security check passes before the link action is executed).
Parameters
$subscriberSubscriber Model
Usage:
add_action('fluent_crm/smart_link_verified', function($subscriber) {
// Secure smart link was verified for this contact
});Source: app/Hooks/Handlers/RedirectionHandler.php
fluent_crm/smart_link_clicked_by_contact
ProFires when a smart link is clicked by a known contact. This hook fires before the contact is redirected to the target URL.
Parameters
$smartLinkObject - Smart link data$contactSubscriber Model
Usage:
add_action('fluent_crm/smart_link_clicked_by_contact', function($smartLink, $contact) {
// Track smart link engagement
}, 10, 2);Source: fluentcampaign-pro/app/Hooks/Handlers/SmartLinkHandler.php
Activity & Event Tracking
fluent_crm/track_activity_by_subscriber
This action runs when a contact logs in to your site or clicks a link. This hook tracks the last_activity timestamp.
Parameters
$subscriberINT|Subscriber Model
Usage:
add_action('fluent_crm/track_activity_by_subscriber', function($subscriber) {
if(is_numeric($subscriber)) {
$subscriber = fluentCrmApi('contacts')->getContact($subscriber);
}
// Do your stuff here
});Source: app/Hooks/Handlers/ExternalPages.php, app/Hooks/Handlers/RedirectionHandler.php
fluent_crm/event_tracked
This action fires when a custom event is tracked for a contact via the Tracker API. Fires for both new events and updated (incremented) events.
Parameters
$eventEventTracker Model$subscriberSubscriber Model
Usage:
add_action('fluent_crm/event_tracked', function($event, $subscriber) {
// A custom event was tracked
// $event->event_key, $event->value, $event->counter
}, 10, 2);Source: app/Api/Classes/Tracker.php
Preference Updates
fluent_crm/pref_form_self_contact_updated
This action runs when a contact updates their information on the manage subscriptions page.
Parameters
$subscriberSubscriber Model$postedDataArray - key value pairs of data filled in the web form
Usage:
add_action('fluent_crm/pref_form_self_contact_updated', function($subscriber, $postedData) {
// Do your stuff here
}, 10, 2);Source: app/Hooks/Handlers/PrefFormHandler.php