# Tracking Code Website + Web App

**URL:** <https://community.hubspot.com/t/tracking-code-website-web-app/118210>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [October 11, 2024, 3:22pm UTC](https://community.hubspot.com/t/tracking-code-website-web-app/118210 "2024-10-11T15:22:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MStafford59](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@MStafford59](https://community.hubspot.com/u/MStafford59)\
**Post date:** [October 11, 2024, 3:22pm UTC](https://community.hubspot.com/t/tracking-code-website-web-app/118210/1 "2024-10-11T15:22:55Z")

</div>

Hi everyone,

I’ve been working with our development team and HubSpot support and haven’t been able to find a solution to this problem. I’m hoping someone out there has figured this out and can lend a helping hand.  
The Problem: We have the HubSpot tracking code installed on our main website, call it [mainwebsite.com](http://mainwebsite.com). A visitor might come to our website and view the home page and the pricing page. After which, they might click “Try for free”, which takes them to our web application hosted on a subdomain ([app.mainwebsite.com](http://app.mainwebsite.com)). Once they create an account on our web application, we are unable to see the pages views on [mainwebsite.com](http://mainwebsite.com). It only shows the page views from [app.mainwebsite.com](http://app.mainwebsite.com).  
Has anyone had sucess in linking these two websites together?

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [October 11, 2024, 3:29pm UTC](https://community.hubspot.com/t/tracking-code-website-web-app/118210/2 "2024-10-11T15:29:05Z")

</div>

Hi @MStafford59 you’ll want to check your [settings for cross-domain linking](https://knowledge.hubspot.com/reports/set-up-sources-tracking#track-multiple-domains-with-cross-domain-linking) to see if that resolves the issue. There are some downsides (IMO) to enabling this, so it’s worth fully testing it out to see if there are more pros than cons for your use case.

---

<div class="post-metadata">

**Author:** ![MStafford59](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@MStafford59](https://community.hubspot.com/u/MStafford59)\
**Post date:** [October 11, 2024, 3:33pm UTC](https://community.hubspot.com/t/tracking-code-website-web-app/118210/3 "2024-10-11T15:33:11Z")

</div>

Hi there! Both the main website and the web app are added to our site domains and the cross-domain tracking is turned on. This doesn’t seem to be fixing the issue.  
Out of curiosity, what are the downsides you mentioned? Is there a better way to acomplish this?
