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

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註