What page was a contact on when they submitted a form?

ActiveCampaign plans
Starter
Plus
Pro
Enterprise

If you have forms on multiple pages on your website, you may want to track the page that a contact was on when they submitted your form. There are a couple of ways that this can be accomplished. In this article, you'll learn how to track what page a contact was on when they submitted your form. 

Use multiple forms

With this solution, we will create one form and then make duplicates. Each duplicate form will be named after the web page that we're going to publish it to. Giving each form a unique name, such as the page they will be published to, will make it easy to see where your contacts came from when they submitted your form.

You can use any form type for this solution.

1. Create a form in your ActiveCampaign account.

2. From the Forms overview page, click the caret next to the "Edit" button.

A copy of your form will appear on the Forms overview page. The name of the form will include "(Copy)".

3. Click the "Edit" button for the form you want to rename. 

4. The form builder will load. Click the form's name at the top of the builder.

5. Type the new name of the form into the field. The name will save automatically.

6. Repeat these steps for every webpage you want to publish the form to.

7. Publish the form to your website.

As a compliment to renaming your forms, you can add tags to contacts using the "Add a tag" form action. You can use this to tag contacts with the name of the form they submitted or the name of the webpage that the form was published to.

Advanced: Use hidden fields and JavaScript

This solution requires knowledge of JavaScript. If you're not familiar with Javascript, you may want to use a Certified Consultant for assistance, or use the solution above.  

You can create a hidden field that will populate with a variable you set for each webpage. Use this method if you don't want to keep multiple copies of your form.

Hidden fields can only be used with inline forms.

1. Click "Website" on the left menu of your account.

2. Locate the form you wish to work with, then click the "Edit" button.

3. The form builder will load. Create a hidden field and add it to your form.

4. Populate your hidden field with JavaScript.  Set your variable as the value of the hidden field. Your page URL location can be found in window.location.href.

As contacts submit your form(s), the hidden field will be populated with the JavaScript variable you made and displayed on contacts’ profile pages as a custom field.

Have more questions? Submit a request

Start free trial