I'm using the 'wpforms_frontend_form_action' filter to change the action attribute of my WPforms form.
I also use Google recaptcha v3 on that form, but its effect is limited and i still receive spam because bots get the modified action attribute which contains my final url directly in the script to bypass control.
What i'd need is to get the recaptcha value of my WPform and then perform the control myself before sending data to my final url.
How to get the WPforms recaptcha value ? The 'wpforms[recaptcha]' field is empty...
EDIT : I guess the recaptcha challenge is not launched until the user submits the form, so maybe there is an other way to change the action url of my WPForm AFTER the submission and not through the 'wpforms_frontend_form_action' filter ?
Thanks for help
Related
I was wondering if someone have had this type of issue when tracking form submissions from a hubspot form.
To give you some context, our client' site is an SPA and has x3 different Hubspot form.
The solution I applied to track form submissions was to create a Custom HTML HubSpot Success Listener Tag, and then I created a look-up table to pass the form ID in a more friendly way.
The issue I'm having is that when I debug this implementation and subscribe to more than one form during the same session, the second submission duplicates:
I know I can configure the tag to fire once per event, instead of once per page. However, I don't want to lose the ability to count a second form during the same session because it's possible a user will want to fill out one form to receive information and another form to arrange a meeting.
Should I get the web developers involved to implement a dataLayer push for each form?
Thanks.
First, you want to debug your existing solution. You don't need GTM for it, though you can still use it. For the debugging, you will want to know what HS returns in their callback on form submission.
Just open your console, paste a listener that would show you the payload coming with it and inspect it:
window.addEventListener("message", function(event) {
console.log(event.data);
});
You will see something like this:
This indicates that we get three callbacks on form submission. You can listen for any of these.
Ah, looks like I'm getting the same form IDs that you have on your screenshot. Now, I'm not sure where that ID comes from. It's likely your developers and not HS are responsible for form IDs. I don't imagine HS could make such a trivial mistake. So ask the devs to change the form ids.
If they can't set unique ids for the forms, then yes, they will have to push custom events there.
We are using Marketo form for lead capturing and using munchkin for lead tracking. Right now, we are facing an issue: when we browse the website for the first time the Marketo form is loading properly and submitted successfully but after the first submission the Marketo form does not show up agian. We are using WordPress for our website.
We are using this Marketo js: //app-sj17.marketo.com/js/forms2/js/forms2.min.js
Loading form as follows:
MktoForms2.loadForm("//app-sj17.marketo.com", "025-WCE-875", 1000, function(form) {
// Add an onSuccess handler
});
Putting it inside : <form id="mktoForm_1000" style="display:none;"></form>
Any help will be valuable.
Thanks
In the form editor there is a setting that affects this behaviour.
Go to the Settings tab in the form editor and look for the “If Known Visitor, Show” setting. Make sure that you have the “Form” option selected as opposed to the Custom HTML”. Please see the screenshot below.
Explanation: before the first form fillout your visitor is unknown, so the form is shown every time. However, after the form submission your visitor will be known, thus if you have this setting enabled, the form will be hidden afterwards.
I have one step checkout form and need to validate it in realtime without refreshing page, because I have custom payment method that need javascript to trigger the payment process. My problem now is that I could not find any functions or javascript library to validate my form.
What I want is want to get function that return true if the form is valid and return error message when the customer missing or input wrong information.
Please help!!!
I was wondering how can we track a click on a link sent via email using Google Tag Manager.
I mean, the user gets an email that contains an URL to our website, we would like to know if the user clicks on that link.
Is it possible to do it all just using the GTM console or do we have to add some extra code to fire up the event?
To be pedantic, you cannot track the "click" on the link since the mail itself does not contain tracking code or GTM code.
However you can append a parameter to the link (if you are using Google Analytics you should tag all of your links with campaign parameters in any case). Then you can check within GTM (e.g. via a url type variable with component type set to query string) if the parameter is present and then fire your tags accordingly.
I have a signin form on my website inside a page where users can search for stuff after signing in.
There is a third party mobile application that is letting my users signin through submitting the form on signin.aspx page from my website.
My question is how can I tell if a form is being submitted from a third party and not from my website?
As Claudio stated, you can not reliably use the "referer" value. The value can be spoofed. A safer approach would be to employ a CSRF token, or something akin to that.
For example, you could include the ASP.NET session ID in a hidden form element. Then, when the form is submitted, compare the value of the form element to the user's session ID. If they do not match, the form submission didn't come from your website.
You have the referer HTTP header but unfortunately this is not 100% accurate and in some cases it could be changed in the middle of the request.
You could add an extra parameter to your local form. If the parameter is not present, then post comes form a third party site.