# Forms tracking

**URL:** <https://community.hubspot.com/t/forms-tracking/108459>\
**Category:** Reporting & Analytics\
**Tags:** forms\
**Created:** [June 2, 2024, 10:21am UTC](https://community.hubspot.com/t/forms-tracking/108459 "2024-06-02T10:21:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yogeshwari\_m](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yogeshwari\_m](https://community.hubspot.com/u/Yogeshwari_m)\
**Post date:** [June 2, 2024, 10:21am UTC](https://community.hubspot.com/t/forms-tracking/108459/1 "2024-06-02T10:21:21Z")

</div>

i have created a hubspot form and shared it on my website. While tracking down the form it is giving direct traffic to that website, but i am sure that it is not a famous website and people are not directly coming to it, they are either searching some keyword thats bringing them to our page or are reffered by other pages. how can i track the original source of the lead in this case.  
please provide me with exact steps.

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [June 2, 2024, 10:24am UTC](https://community.hubspot.com/t/forms-tracking/108459/2 "2024-06-02T10:24:32Z")

</div>

Hi [@Yogeshwari\_m](https://community.hubspot.com/t5/user/viewprofilepage/user-id/771322),

Source tracking requires an installed HubSpot tracking code as well as accepted cookies:

> **[Install the HubSpot tracking code](https://knowledge.hubspot.com/reports/install-the-hubspot-tracking-code)**
>
> If you're not hosting your entire website with HubSpot, learn how to install the tracking code on your website following the instructions specific to your website host.

> **[Customize cookie tracking settings and consent banners (legacy)](https://knowledge.hubspot.com/privacy-and-consent/customize-your-cookie-tracking-settings-and-consent-banner)**
>
> Customize your cookie tracking settings and privacy policy alert in HubSpot. Learn to also view your contacts' interactions with the cookie policy banner.

Once you’ve set this up, you should see original sources being tracked correctly.

Best regards!

---

<div class="post-metadata">

**Author:** ![Yogeshwari\_m](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yogeshwari\_m](https://community.hubspot.com/u/Yogeshwari_m)\
**Post date:** [June 3, 2024, 7:15am UTC](https://community.hubspot.com/t/forms-tracking/108459/3 "2024-06-03T07:15:43Z")

</div>

thankyou Karstenkoehler for the response. i have added the tracking code in the script but its still showing the lead as dirrect traffic, though it is within another website and i have navigated to that form via it, so its definitely not direct traffic.  
is there any other suggestion that could solve my error.  
thankyou

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [June 3, 2024, 7:18am UTC](https://community.hubspot.com/t/forms-tracking/108459/4 "2024-06-03T07:18:25Z")

</div>

[@Yogeshwari\_m](https://community.hubspot.com/t5/user/viewprofilepage/user-id/771322) have you checked in your browser console whether the tracking code is loaded correctly? Have you looked into the cookie policy? How exactly are you testing?

---

<div class="post-metadata">

**Author:** ![Yogeshwari\_m](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yogeshwari\_m](https://community.hubspot.com/u/Yogeshwari_m)\
**Post date:** [June 3, 2024, 11:44am UTC](https://community.hubspot.com/t/forms-tracking/108459/5 "2024-06-03T11:44:49Z")

</div>

yes i did.  
i was suggested that the reason i am getting this error of direct traffic is because the form is getting embedded inside an i-frame.  
can you suggest me how to remove this i-frame.  
i am writing the embed code of form in my wordpress file.

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [June 3, 2024, 11:50am UTC](https://community.hubspot.com/t/forms-tracking/108459/6 "2024-06-03T11:50:13Z")

</div>

[@Yogeshwari\_m](https://community.hubspot.com/t5/user/viewprofilepage/user-id/771322) that is very likely the reason, yes. Why don’t you embed it following these steps? [Set up and style a legacy form on an external site](https://knowledge.hubspot.com/forms/how-can-i-share-a-hubspot-form-if-im-using-an-external-site)

---

<div class="post-metadata">

**Author:** ![Yogeshwari\_m](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yogeshwari\_m](https://community.hubspot.com/u/Yogeshwari_m)\
**Post date:** [June 4, 2024, 6:50am UTC](https://community.hubspot.com/t/forms-tracking/108459/7 "2024-06-04T06:50:12Z")

</div>

I tried this and discovered that it isn’t possible to remove the i-frame from wix forms, or wordpress forms. I am currently reffering to [https://legacydocs.hubspot.com/docs/methods/forms/submit\_form\_v3\_authentication](https://legacydocs.hubspot.com/docs/methods/forms/submit_form_v3_authentication) .  
But here i am facing the issue that i am unable to comprehend as to where exactly i am to write the code.  
can you please explain this in detail/ stepwise.  
Thankyou in advance

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [June 4, 2024, 6:52am UTC](https://community.hubspot.com/t/forms-tracking/108459/8 "2024-06-04T06:52:11Z")

</div>

[@Yogeshwari\_m](https://community.hubspot.com/t5/user/viewprofilepage/user-id/771322) can you have a look at these steps? [Add HubSpot forms to WordPress pages and posts (legacy)](https://knowledge.hubspot.com/integrations/create-a-hubspot-form-in-wordpress)

---

<div class="post-metadata">

**Author:** ![SalmanLatif](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@SalmanLatif](https://community.hubspot.com/u/SalmanLatif)\
**Post date:** [June 3, 2024, 6:33am UTC](https://community.hubspot.com/t/forms-tracking/108459/9 "2024-06-03T06:33:00Z")

</div>

Hi [@Yogeshwari\_m](https://community.hubspot.com/t5/user/viewprofilepage/user-id/771322),  
Since you’ve requested ‘exact steps’, let me share precisely these.

The first thing you must do is to make sure you have set up and correctly configured your tracking in HubSpot. Here’s how:

1. **Install the HubSpot Tracking Code on Your Website:**

2. **Use UTM Parameters for Better Tracking:**

3. **Enable Auto Tracking for Forms:**

4. **Check Original Source Data in Contacts:**

5. **Create a Custom Report:**

6. **Analyze Traffic Sources in Analytics Tools:**

I hope these steps can help you accurately track the source of the leads you are getting on your HubSpot form.

---

<div class="post-metadata">

**Author:** ![Yogeshwari\_m](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yogeshwari\_m](https://community.hubspot.com/u/Yogeshwari_m)\
**Post date:** [June 3, 2024, 7:09am UTC](https://community.hubspot.com/t/forms-tracking/108459/10 "2024-06-03T07:09:23Z")

</div>

Thankyou SalmanLatif for the detailed explanation. Its really helpful.  
i just need to ask few more questions here and it would be a great help if you could answer them as well.  
1. is it necessary to have **UTM builder** , actually my current plan does not include campaign and i suppose that is the reason i am not get the option of UTM builder.  
2. Also i see no option relating to **Traffic Analytics** , is it possible to get the lead sources without this option. Also can we show it in the dashboard or it can only be tracked by reports.  
if you could reply to this it would be greatly appreciated.  
thankyou in advance.

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [June 3, 2024, 7:14am UTC](https://community.hubspot.com/t/forms-tracking/108459/11 "2024-06-03T07:14:01Z")

</div>

[@Yogeshwari\_m](https://community.hubspot.com/t5/user/viewprofilepage/user-id/771322) the UTM builder and the traffic analytics do not affect the correct capture of source information.

UTM parameters are typically already appended to URLs, then captured by HubSpot’s tracking code. You would only add utm parameters to pages you own and where HubSpot doesn’t do this automatically.

In that case, you can also use this tracking URL builder: [https://ga-dev-tools.google/campaign-url-builder/](https://ga-dev-tools.google/campaign-url-builder/)

Just make sure the parameters match what HubSpot is looking for: [Understand HubSpot's traffic sources in the web traffic analysis tool](https://knowledge.hubspot.com/reports/understand-hubspots-traffic-sources-in-the-traffic-analytics-tool)

The traffic analytics aren’t any tool that captures but that visualizes what has been capture: [Analyze your site traffic with web traffic analytics](https://knowledge.hubspot.com/reports/analyze-your-site-traffic-with-the-traffic-analytics-tool)

However, **all of the above is a side note and leading away from your original question**.

Simply install the tracking code and make sure your cookie policy is all set up and HubSpot will take care of this for you.

> **[Install the HubSpot tracking code](https://knowledge.hubspot.com/reports/install-the-hubspot-tracking-code)**
>
> If you're not hosting your entire website with HubSpot, learn how to install the tracking code on your website following the instructions specific to your website host.

[https://knowledge.hubspot.com/privacy-and-consent/customize-your-cookie-tracking-settings-and-consen…](https://knowledge.hubspot.com/privacy-and-consent/customize-your-cookie-tracking-settings-and-consent-banner)
