<?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 Hubspot tracking code in web-app via GTM in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-tracking-code-in-web-app-via-GTM/m-p/988822#M74173</link>
    <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have added the Hubspot tracking code via GTM to&lt;/P&gt;&lt;P&gt;- our website: example.com&amp;nbsp;&lt;/P&gt;&lt;P&gt;- our web-app: app.example.com&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to be able to create/update Contacts in Hubspot when they create a user account in our web-app.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the documentation I learned that we need add to the web-app:&amp;nbsp;&lt;/P&gt;&lt;P&gt;- an identify function&amp;nbsp;&lt;/P&gt;&lt;P&gt;- trackPageView events&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone advise how to add these via GTM?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried simply copy pasting the code snippets from the API documentation into Custom HTML snippets in GTM, but that doesn't seem to work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice would be greatly appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Michiel&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jun 2024 14:19:05 GMT</pubDate>
    <dc:creator>Mvs</dc:creator>
    <dc:date>2024-06-07T14:19:05Z</dc:date>
    <item>
      <title>Hubspot tracking code in web-app via GTM</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-tracking-code-in-web-app-via-GTM/m-p/988822#M74173</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have added the Hubspot tracking code via GTM to&lt;/P&gt;&lt;P&gt;- our website: example.com&amp;nbsp;&lt;/P&gt;&lt;P&gt;- our web-app: app.example.com&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to be able to create/update Contacts in Hubspot when they create a user account in our web-app.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the documentation I learned that we need add to the web-app:&amp;nbsp;&lt;/P&gt;&lt;P&gt;- an identify function&amp;nbsp;&lt;/P&gt;&lt;P&gt;- trackPageView events&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone advise how to add these via GTM?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried simply copy pasting the code snippets from the API documentation into Custom HTML snippets in GTM, but that doesn't seem to work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice would be greatly appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Michiel&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 14:19:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-tracking-code-in-web-app-via-GTM/m-p/988822#M74173</guid>
      <dc:creator>Mvs</dc:creator>
      <dc:date>2024-06-07T14:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Hubspot tracking code in web-app via GTM</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-tracking-code-in-web-app-via-GTM/m-p/988952#M74180</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/455316"&gt;@Mvs&lt;/a&gt;&amp;nbsp;- I hope I understand the context correctly. Won't this setup always have the issue that client-side Javascript won't ever have the access rights to creat a HubSpot record?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have been through a similar setup on a recent project and tried to resolve it in a couple of ways:&lt;/P&gt;
&lt;P&gt;- The app creates a "signal" to HubSpot via a 3rd party plugin like Segment which can then create the records (and populate it with internal app information beyond just name/email etc.)&lt;/P&gt;
&lt;P&gt;- Asking the user to register using a HubSpot form that then redirects on submit to the app interface with query string parameters that carry name/email/etc. This requires a bit of form customization, but give a nice uniform experience for CTA forms across your site.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this is helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 18:28:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-tracking-code-in-web-app-via-GTM/m-p/988952#M74180</guid>
      <dc:creator>SteveHTM</dc:creator>
      <dc:date>2024-06-07T18:28:57Z</dc:date>
    </item>
  </channel>
</rss>

