APIs & Integrations

BruceClark406
Member

Custom Behavioral Events Triggering when not wanted to

Hello!
Question here (Hope I am in the right place)
I am trying to created a custom behavioral event to track a specific metric.
I have it set up to only trigger when I hit the api endpoint.
However, before I could finish the implementation, I see that my custom behavior event (pe8018486_churned_subscription) is already being triggered.
All we have in our code is
<!-- Start of HubSpot Embed Code -->
<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/8018486.js"></script>
<!-- End of HubSpot Embed Code -->
If I am correct, this should not trigger our event.

Thanks in advance!!

2 Replies 2
GRajput
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

Custom Behavioral Events Triggering when not wanted to

Hi @BruceClark406 

You are correct, the HubSpot embed code should not trigger your custom behavioral event. The embed code only tracks page views and form submissions.

If your custom behavioral event is still being triggered, it is likely because you have another piece of code on your page that is triggering it. To troubleshoot this, you can use the HubSpot debugger to see what code is triggering the event.

To use the HubSpot debugger, follow these steps:

1. Go to the HubSpot Developer Console.
2. In the navigation pane, select "Debugger".
3. In the "Debug Code" field, paste the URL of the page that is triggering the event.
4. Click "Debug".

The debugger will show you a list of all the code on the page that is interacting with HubSpot. You can then use this information to find the code that is triggering the event.

Once you have found the code that is triggering the event, you can modify it so that it no longer triggers the event.

Here are some possible solutions for modifying the code:

* If the code is calling the HubSpot API, you can add a check to make sure that the API call is only made when the user hits the API endpoint.
* If the code is using the HubSpot tracking code, you can add a check to make sure that the tracking code is only added when the user hits the API endpoint.

Once you have modified the code, you can test it to make sure that it is no longer triggering the event.

 

Hope this will helps you out. Please mark it as Solution Accepted to help other Community member.
Thanks!




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


Himanshu_Devgan
Member

Custom Behavioral Events Triggering when not wanted to

I have the same kind of concern, using custom events with the default events too, When the page loads the default event gets triggered, but this default event is also being tracked/saved in the custom event that I have created, and when the custom event got triggered it is not tracking/saving the data in custom event.

 

the code is: I am sending the property here but it also not being updated

Himanshu_Devgan_2-1690604395540.png

 

Himanshu_Devgan_1-1690604314973.png

 

0 Upvotes