What's the best way to capture original referrer for website leads when using 3rd party forms?

We’ve been using AC for a year or so after leaving HubSpot and there’s one thing in particular that is still hard.

We use Gravity Forms in WordPress for all forms, so Active Campaign doesn’t automatically track visitor behaviour before conversion.

To get around that we are dropping cookies using Google Tag manager and then reading them into Gravity Forms and then syncing with AC.

It’s messy and prone to problems, and this is something HubSpot does on the free version.

Am I missing something, or is that still the best way?

This should help you to use the ActiveCampaign site tracking code to make a cookie association with a visitor from a custom form submission on your website. Before following these steps please ensure you have​ installed the site tracking code​ on your site and have whitelisted your website domains accordingly.

Thanks.

So that code I assume needs to go in the head of every tracked page.

The first sets up the variable, and the second looks for form submits and then sends?

Yes, the first is an example of the ActiveCampaign site tracking. You would get this from your dashboard and put this on your page as you would any tracking javascript block (usually before the closing head tag). The second part is an example of how you would use the vgo object in your own client JavaScript to register with ActiveCampaign’s tracking when someone submits your custom form. This part depends on you having a way to hook into the form’s submission event.

I hope this helps!