Site Tracking Scripts

Overview

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

  • ActiveCampaign
  • AgileCRM
  • Drip
  • 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.

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.

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).

Was this helpful?