Skip to main content
Get in touch
Code

Enable Site Tracking with Active Campaign + Gravity Forms

March 07,2024 Read Time: 9 minutes
Nicholas Macauley

Nicholas Macauley

Nicholas leads BKO’s product management practice to deliver innovative products and engaging experiences through design thinking, software engineering, and data science.

ActiveCampaign is a robust and extremely user-friendly marketing automation and sales CRM platform. Its leading feature is Site Tracking, which allows marketers to gain valuable insights into how their visitors are interacting and engaging with their content online.

ActiveCampaign records essential clickstream data and granularly segment contacts based on that data. With contacts segmented, marketers can perform behavior-based targeting at scale.

Although Site Tracking works flawlessly with ActiveCampaign’s own embedded forms, integrating it with third-party forms can be a bit tricky.

We were asked by clients to enable Site Tracking using the Gravity Forms plugin in WordPress but had difficulty initially finding dependable information on how to effectively implement this. After navigating multiple forums, Slack Channels, and working directly with the ActiveCampaign team (Thanks Kelly/Christian/Elizabeth!!), we succeeded.

During our retrospective, we felt it would be helpful to document our process so others can benefit from our efforts. Here’s our guide. We hope it provides the steps needed to successfully enable the ActiveCampaign Site Tracking feature using Gravity Forms.

[Note, this guide is for enabling Site Tracking. You’ll also need to Create a Feed in Gravity Forms that pushes visitor information to ActiveCampaign when a form is submitted. You can find the instructions from Gravity Forms here.

To get this to work, you’ll need the following:

  1. A WordPress Website
  2. An Active Campaign Account – A subscription for ActiveCampaign
  3. Gravity Forms Plugin  – WordPress Plugin (updated to most recent version)
  4. Gravity Forms ActiveCampaign Add-On – An add-on for the Gravity Forms plugin

STEP 1: Install the Gravity Forms plugin and ActiveCampaign add-on. Activate your Gravity Forms license.

Download and install the Gravity Forms plugin and the ActiveCampaign Add-on. Once installed, add a Gravity Forms license key and activate the license.

STEP 2: Connect Gravity Forms to your ActiveCampaign account.

After activating the Gravity Forms plugin, navigate to your “Developer Settings” of your ActiveCampaign instance to retrieve your account’s API URL and API Key. Add your API URL and API Key to the “ActiveCampaign” section of the Gravity Forms settings.

Step 3: Enable Site Tracking in ActiveCampaign.

Navigate to the “Tracking” settings in your ActiveCampaign instance  (Settings > Tracking) and toggle the “Enable Tracking” button to “On”. You may want to whitelist your domain if you haven’t done so already. Once you’ve completed the two actions, scroll down to the “Tracking Code” and copy the Account ID. It’s the nine-digit number next to “pgo(‘setAccount”. You’ll need it for the next step.

Step 4: Add Code Snippet To The Theme’s Footer.php File.

Navigate to the footer.php file of your WordPress theme (Appearance>Editor>Footer.php) and paste the code snippet embedded below into your site’s Footer.php file (paste it before the closing body tag “</body>”). Replace actid=XXXXXXXXX in the code snippet with your ActiveCampaign account ID (e.g. actid=959595959&e – remember to maintain the “&e” at the end of the number series). Save and close the footer.php file.