Lead Capture Tools

balabanov
Colaborador(a)

Ignore a specific non-Hubspot form from being collected

resolver

Hey there!

 

Is there an option to keep the "Collect data from website forms" option enabled, but to somehow mark a few forms to be skipped by the Hubspot form tracking JS code?

I vaguely recall there was some markup feature, but, for the life of me, I can't find any evidence to that.

3 Solução aceitas
balabanov
Solução
Colaborador(a)

Ignore a specific non-Hubspot form from being collected

resolver

Well, while we're at it and I don't have a blog to post it to, there is a way to exclude a specific form from being collected.

 

What you need to do is add the following code to it:

<label for="amex" style="display:none">AMEX</label>
<input type="hidden" name="amex" required="" value="" id="amex">

HS JS tracking code will deem your form as one that contains sensitive data and will ignore it. 

Exibir solução no post original

ianpetzer
Solução
Participante

Ignore a specific non-Hubspot form from being collected

resolver

I've gone and looked at the source for collected-forms.js

They check for the following labels:

, s = ["credit card", "card number", "expiration", "expiry", "ccv", "cvc", "cvv", "secure code", "mastercard", "american express", "amex"]

and the following for names:
, c = ["cc-num", "cc-number"]

 

in a function called isSensitive which is used in a function called rejectIfAnyFieldSensitive

 

So I've managed to get the form to not submit with the following markup:

 

    <label for="cc-num" class="hidden">credit card HubspotCollectedFormsWorkaround https://community.hubspot.com/t5/APIs-Integrations/How-to-stop-collected-forms-from-collecting-a-form/m-p/299172#M28102</label>
    <input name="cc-num" class="hidden" required="" value="HubspotCollectedFormsWorkaround" id="cc-num">

Would be great if this could be added to the documentation 

 

Exibir solução no post original

garrett9
Solução
Membro

Ignore a specific non-Hubspot form from being collected

resolver

I noticed that when you specify in HubSpot to collect info from non-HubSpot forms, it attempts to add the script collectedforms.js to your website. However, before doing so, it checks to see if it's already installed by using the document.getElementById method where the ID is CollectedForms-1234 (1234 is the ID at the end of your tracking script). Therefore, if you simply put any HTML element on your page with that ID, such as

<span id="CollectedForms-1234"></span>, it won't install the collectedforms.js file, meaning it also won't collect information on your non-HubSpot forms. While still a hack, it doesn't force you to change your forms, and it's much easier to conditionally add it based on where the user is in your app. Just be sure that this element exists statically on your website, and isn't loaded dynamically.

Exibir solução no post original

38 Respostas 38
JFuentesZ
Participante

Ignore a specific non-Hubspot form from being collected

resolver

Although this feature is not yet available. This is a workaround I found useful, but you need Pro or higher in order to access workflows:

Screenshot_3.png

Basically, trigger is to be any form submissions on your specific Non-Hubspot form. Then, in my case I inputed a timestamp simply because I want to review any contacts that got created before that timestamp. Yet it might not be needed if you need not review them.

 

After this, I simply added a small delay, and chose the option to Delete Contact as an action.

vserranoh
Participante

Ignore a specific non-Hubspot form from being collected

resolver

Thanks for sharing! 🙌

0 Avaliação positiva
BDehlinger
Participante | Parceiro Diamante
Participante | Parceiro Diamante

Ignore a specific non-Hubspot form from being collected

resolver

Checking in on this - any chance we can select which non-hubspot forms we want to collect from in 2022? 

balabanov
Colaborador(a)

Ignore a specific non-Hubspot form from being collected

resolver

Nope 🙂

0 Avaliação positiva
AnkitGandhi
Membro

Ignore a specific non-Hubspot form from being collected

resolver

I have a few WordPress forms that are integrated with hubspot.
I don't want to create a contact for a particular form. for instance, for a form on my career page - I don't want to include the submissions as a marketing contact.

 

Where do I add the above code? as I cannot edit any non-hubspot form.

0 Avaliação positiva
garrett9
Solução
Membro

Ignore a specific non-Hubspot form from being collected

resolver

I noticed that when you specify in HubSpot to collect info from non-HubSpot forms, it attempts to add the script collectedforms.js to your website. However, before doing so, it checks to see if it's already installed by using the document.getElementById method where the ID is CollectedForms-1234 (1234 is the ID at the end of your tracking script). Therefore, if you simply put any HTML element on your page with that ID, such as

<span id="CollectedForms-1234"></span>, it won't install the collectedforms.js file, meaning it also won't collect information on your non-HubSpot forms. While still a hack, it doesn't force you to change your forms, and it's much easier to conditionally add it based on where the user is in your app. Just be sure that this element exists statically on your website, and isn't loaded dynamically.
NBorunda0
Membro

Ignore a specific non-Hubspot form from being collected

resolver

Do you know if it will work if it's added dynamically but above the HS code?

0 Avaliação positiva
FRaI
Membro

Ignore a specific non-Hubspot form from being collected

resolver

Its now matching the TagName too, meaning the ID has to be in a <script> tag.

Inside the embeded https://js-na1.hs-scripts.com/1234.js:

var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(n,i)}}("CollectedForms-1234",XY......

You have to specify it as follows, to not have it tracked by HubSpot:

<script id="CollectedForms-1234"></script>
<!-- stops Hubspot collection -->

Can you verify that too?

SGibbons5
Membro

Ignore a specific non-Hubspot form from being collected

resolver

Is it possible to apply this with Google Tag Manager. What is the trigger? 

0 Avaliação positiva
CParekh
Membro

Ignore a specific non-Hubspot form from being collected

resolver

Strike what I asked below, definitely still valid! Thanks @garrett9 

 

Hi @garrett9 does the above fix still apply? I've tried looking for collectedforms.js or any elements with an id like "CollectedForms-" but can't find either in the source... 

vcheloudiakof
Participante

Ignore a specific non-Hubspot form from being collected

resolver

Thank's a lot, this solution solve my problem ! Please,this should be documented and used other than with a hack!

0 Avaliação positiva
RLeo
Colaborador(a) | Parceiro Diamante
Colaborador(a) | Parceiro Diamante

Ignore a specific non-Hubspot form from being collected

resolver

This is the only solution that worked for me, the "hack" of inserting a label with a required field like "amex" and such, works partially... it doesnt register the submissions, but it still auto-creates the form on Hubspot, and notifications by email still arrive (weird).

 

Thank you very much garrett9!

pacoforet
Participante

Ignore a specific non-Hubspot form from being collected

resolver

This worked for us (Wordpress + Contact Form 7). The other solutions did not.

Daniesy
Participante

Ignore a specific non-Hubspot form from being collected

resolver

For those who want to do disable forms from being collected on specific Wordpress pages, the following code written in functions.php does the trick:

 

 

 

 

add_action( 'wp_footer', 'custom_wp_dequeue_script', 11 );
function custom_wp_dequeue_script() {
  if ( is_page('Page title') ) {
    wp_dequeue_script( 'leadin-script-loader-js' );
  }
}

 

 

 

 

ENasier
Membro

Ignore a specific non-Hubspot form from being collected

resolver

Hi there,

 

Do you insert the full url in this section? if ( is_page(' page title ) 

 

?

 

0 Avaliação positiva
RThomas6
Participante

Ignore a specific non-Hubspot form from being collected

resolver

This works well for one page. but I have 3 pages I need to remove these froms. Essentially we hire low wage workers and these days about 80% don't even show up for work so I don't want to add hundreds of people a month into Hubspot that don't serve a purpose.

0 Avaliação positiva
PamCotton
Gerente da Comunidade
Gerente da Comunidade

Ignore a specific non-Hubspot form from being collected

resolver

Hello @Daniesy 

 

Thank you for sharing this solution!

 

Kindly,

Pam

Você sabia que a Comunidade está disponível em outros idiomas?
Participe de conversas regionais, alterando suas configurações de idioma !


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




Traxion-CW
Colaborador(a)

Ignore a specific non-Hubspot form from being collected

resolver

Would love to know if this is on the radar for being worked on. 

jennysowyrda
Gerente da Comunidade
Gerente da Comunidade

Ignore a specific non-Hubspot form from being collected

resolver

Hi @balabanov ,

 

Because non-HubSpot forms requires HubSpot to crawl for all of the forms on your site there is no way to turn it off for certain pages or forms. 

 

For more information, I wanted to share these resources: 

1. Using non-hubspot form

2. non-hubspot forms FAQ

 

Thanks,
Jenny

0 Avaliação positiva
parinsanghvi
Membro

Ignore a specific non-Hubspot form from being collected

resolver

Hi @jennysowyrda , 

Our website has clients dashboard login as well, we have implemented the hubspot tracking code on all pages of the website including the one which has the dashboard. We have several non-HubSpot forms in our dashboard that are not created in Hubspot. Now everytime a client fills one of those firms, Hubspot is capturing it and also sending an email for the same. How can we stop data getting collected from these forms automatically? 

0 Avaliação positiva