ActiveCampaign Forum

Capture lead's referring domain and other info when visitor submits form


#1

Does anyone know how to do this?

I would like to pass this information to my CRM with the lead’s contact information when they submit a form. I have 2 different forms on almost every page of my website. I would like this to work for both forms. I’ve already created these fields in ActiveCampaign.

The fields I would like populated are:

IREFERRER Initial referring URL (the website they came from when they first)

LREFERRER Last referring URL (the website they came from when they most recently visited)

ILANDPAGE Initial landing page (the page they landed on first on my website)

ONPAGE Page they submit the form on (what page they were on when they submit the form)

FORMNAME Which form they submit (I have two forms. they have class names _form_1 and _form_3)

VISITS The number of times the visitor came to the website before filling the form

UTM variables = utm_source, utm_term

related wordpress functions: https://wordpress.stackexchange.com/questions/113382/whats-the-best-way-to-detect-referrer

Example of GitHub code: https://github.com/medius/utm_form