<?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 Custom Behavioral Event is showing completions before I deployed the code to the prod site. in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Custom-Behavioral-Event-is-showing-completions-before-I-deployed/m-p/753424#M61245</link>
    <description>&lt;P&gt;Hey!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a custom behavioral event called "Email Capture".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hubspot gave me a code snippet like this to execute on my site whenever a user performs this action.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;_hsq&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;window&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;_hsq&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;window&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;_hsq&lt;/SPAN&gt;&lt;SPAN&gt; || [];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;_hsq&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;push&lt;/SPAN&gt;&lt;SPAN&gt;([&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'trackCustomBehavioralEvent'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;'pe123456789_email_capture'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;properties&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// this is optional and you don't have to put anything here &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// give each property a value so we know what they mean&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;options&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ]);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;However I have not deployed this code to my production site yet.&amp;nbsp; It's only on my local site.&amp;nbsp; But I'm seeing thousands of "completions" ever since I created this custom behavioral event in the hubspot UI under Reports &amp;gt; Analytics Tools &amp;gt; Custom Behavioral Events.&amp;nbsp; Why is this event reporting completions when I haven't deployed my custom usage of this code snippet to the prod site yet?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WMusgrove_0-1675870915430.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/84934i4A2CB1293746C7F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WMusgrove_0-1675870915430.png" alt="WMusgrove_0-1675870915430.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 15:43:28 GMT</pubDate>
    <dc:creator>WMusgrove</dc:creator>
    <dc:date>2023-02-08T15:43:28Z</dc:date>
    <item>
      <title>Custom Behavioral Event is showing completions before I deployed the code to the prod site.</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Custom-Behavioral-Event-is-showing-completions-before-I-deployed/m-p/753424#M61245</link>
      <description>&lt;P&gt;Hey!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a custom behavioral event called "Email Capture".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hubspot gave me a code snippet like this to execute on my site whenever a user performs this action.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P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&gt;properties&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// this is optional and you don't have to put anything here &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// give each property a value so we know what they mean&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;options&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ]);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;However I have not deployed this code to my production site yet.&amp;nbsp; It's only on my local site.&amp;nbsp; But I'm seeing thousands of "completions" ever since I created this custom behavioral event in the hubspot UI under Reports &amp;gt; Analytics Tools &amp;gt; Custom Behavioral Events.&amp;nbsp; Why is this event reporting completions when I haven't deployed my custom usage of this code snippet to the prod site yet?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WMusgrove_0-1675870915430.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/84934i4A2CB1293746C7F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WMusgrove_0-1675870915430.png" alt="WMusgrove_0-1675870915430.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 15:43:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Custom-Behavioral-Event-is-showing-completions-before-I-deployed/m-p/753424#M61245</guid>
      <dc:creator>WMusgrove</dc:creator>
      <dc:date>2023-02-08T15:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Behavioral Event is showing completions before I deployed the code to the prod site.</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Custom-Behavioral-Event-is-showing-completions-before-I-deployed/m-p/753429#M61246</link>
      <description>&lt;P&gt;Oh it's because when I added that script is wrapped it in a `if (true)` so it fires on every page hit.&amp;nbsp; Why?&amp;nbsp; I didn't know it would do that.&amp;nbsp; How do I make that stop so I can only fire this event from meaningful places in my custom code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;// 'true' tracks this event on every page view&lt;BR /&gt;if (true) {&lt;BR /&gt;_hsq.push([&lt;BR /&gt;'trackCustomBehavioralEvent',&lt;BR /&gt;{&lt;BR /&gt;name: 'pe123456789_email_capture',&lt;BR /&gt;properties: {&lt;BR /&gt;// give each property a value so we know what they mean&lt;BR /&gt;},&lt;BR /&gt;},&lt;BR /&gt;]);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 15:47:58 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Custom-Behavioral-Event-is-showing-completions-before-I-deployed/m-p/753429#M61246</guid>
      <dc:creator>WMusgrove</dc:creator>
      <dc:date>2023-02-08T15:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Behavioral Event is showing completions before I deployed the code to the prod site.</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Custom-Behavioral-Event-is-showing-completions-before-I-deployed/m-p/753434#M61247</link>
      <description>&lt;P&gt;Do I choose this option instead, but still use the javascript snippet in my custom code to provide the `pe123456789_email_capture` event?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WMusgrove_0-1675871511895.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/84936i493A78B8E61CC4CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WMusgrove_0-1675871511895.png" alt="WMusgrove_0-1675871511895.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 15:52:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Custom-Behavioral-Event-is-showing-completions-before-I-deployed/m-p/753434#M61247</guid>
      <dc:creator>WMusgrove</dc:creator>
      <dc:date>2023-02-08T15:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Behavioral Event is showing completions before I deployed the code to the prod site.</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Custom-Behavioral-Event-is-showing-completions-before-I-deployed/m-p/782507#M63185</link>
      <description>&lt;P&gt;I was having the same issue and I managed to get this to not fire by removing all the code in that snippet and firing it manually within my application or via GTM. There is a message below the code box but it isn't clear in my opinion and sounds like if you you remove this code the event won't be valid and any manual attempt won't work.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Also... annoyingly if you remove all the code from the code block you can't hit the "Done" button on the editor. Something has to be in the box to get the "Done" button to be clickable. I just added a space. I guess a comment would also work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-04-16 at 20.15.40.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/89300iB56408FA1205CF32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2023-04-16 at 20.15.40.png" alt="Screenshot 2023-04-16 at 20.15.40.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Sun, 16 Apr 2023 19:21:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Custom-Behavioral-Event-is-showing-completions-before-I-deployed/m-p/782507#M63185</guid>
      <dc:creator>gavin667</dc:creator>
      <dc:date>2023-04-16T19:21:48Z</dc:date>
    </item>
  </channel>
</rss>

