<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issue with tracking code and SPA - Tracking code only loads and scan first loaded page in Lead Capture Tools</title>
    <link>https://community.hubspot.com/t5/Lead-Capture-Tools/Issue-with-tracking-code-and-SPA-Tracking-code-only-loads-and/m-p/407496#M5318</link>
    <description>&lt;P&gt;Thank you so much! That was really helpfull&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Feb 2021 08:51:09 GMT</pubDate>
    <dc:creator>itur</dc:creator>
    <dc:date>2021-02-09T08:51:09Z</dc:date>
    <item>
      <title>Issue with tracking code and SPA - Tracking code only loads and scan first loaded page</title>
      <link>https://community.hubspot.com/t5/Lead-Capture-Tools/Issue-with-tracking-code-and-SPA-Tracking-code-only-loads-and/m-p/405900#M5279</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue (aka my biggest nightmare) with the tracking code installed in a SAP built in Angular with collected forms&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main problem is that the tracking code&amp;nbsp;&lt;SPAN&gt;is properly tracking the first "page" load. However,&amp;nbsp;&amp;nbsp;it does not rescan a page to look for a form if the user moves around on the site before hitting the form page. In this case, nothing is sent from the form to hubspot (in this case to create a contact). I would use the Contacts API, but then all the ads analitycs are lost, since it sets the "original source" field to "Offline Source" and it doesnt even recognise that a form has been submited.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a way to force the HubSpot script to rescan for a form each time the component content loads?&amp;nbsp; This is driving me crazy.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 18:36:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Lead-Capture-Tools/Issue-with-tracking-code-and-SPA-Tracking-code-only-loads-and/m-p/405900#M5279</guid>
      <dc:creator>itur</dc:creator>
      <dc:date>2021-02-03T18:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with tracking code and SPA - Tracking code only loads and scan first loaded page</title>
      <link>https://community.hubspot.com/t5/Lead-Capture-Tools/Issue-with-tracking-code-and-SPA-Tracking-code-only-loads-and/m-p/406600#M5296</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/162164"&gt;@itur&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to tag some of our experts on this -&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/2450"&gt;@tjoyce&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/109312"&gt;@thesnappingdog&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/1377"&gt;@MatthewShepherd&lt;/a&gt;&amp;nbsp;do you have suggestions for &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/162164"&gt;@itur&lt;/a&gt;&amp;nbsp;on this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Tiphaine&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 13:40:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Lead-Capture-Tools/Issue-with-tracking-code-and-SPA-Tracking-code-only-loads-and/m-p/406600#M5296</guid>
      <dc:creator>TitiCuisset</dc:creator>
      <dc:date>2021-02-05T13:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with tracking code and SPA - Tracking code only loads and scan first loaded page</title>
      <link>https://community.hubspot.com/t5/Lead-Capture-Tools/Issue-with-tracking-code-and-SPA-Tracking-code-only-loads-and/m-p/407110#M5305</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/162164"&gt;@itur&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;
&lt;P&gt;You should be able tap into your router for angular and update the tracking events yourself&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  _hsq.push(['setPath', '/what-we-do']);
  _hsq.push(['trackPageView']);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;    import { Component, OnInit } from '@angular/core';
    import { Router, NavigationEnd } from '@angular/router';
    import { filter } from 'rxjs/operators';
    
    @Component({
      selector: 'app-my-class',
      templateUrl: './my-class.component.html',
      styleUrls: ['./my-class.component.scss']
    })
    export class MyClassComponent implements OnInit {
      constructor(private router: Router) {}
    
      ngOnInit(): void {
        this.router.events
        .pipe(filter(event =&amp;gt; event instanceof NavigationEnd))  
        .subscribe((event: NavigationEnd) =&amp;gt; {
            _hsq.push(['setPath', '/what-we-do']);
            _hsq.push(['trackPageView']);
        });
      }
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/api/events/tracking-code#set-path" target="_blank"&gt;https://developers.hubspot.com/docs/api/events/tracking-code#set-path&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/api/events/tracking-code#track-page-view" target="_blank"&gt;https://developers.hubspot.com/docs/api/events/tracking-code#track-page-view&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 10:43:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Lead-Capture-Tools/Issue-with-tracking-code-and-SPA-Tracking-code-only-loads-and/m-p/407110#M5305</guid>
      <dc:creator>tjoyce</dc:creator>
      <dc:date>2021-02-08T10:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with tracking code and SPA - Tracking code only loads and scan first loaded page</title>
      <link>https://community.hubspot.com/t5/Lead-Capture-Tools/Issue-with-tracking-code-and-SPA-Tracking-code-only-loads-and/m-p/407496#M5318</link>
      <description>&lt;P&gt;Thank you so much! That was really helpfull&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 08:51:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Lead-Capture-Tools/Issue-with-tracking-code-and-SPA-Tracking-code-only-loads-and/m-p/407496#M5318</guid>
      <dc:creator>itur</dc:creator>
      <dc:date>2021-02-09T08:51:09Z</dc:date>
    </item>
  </channel>
</rss>

