cp1132
Forum Replies Created
-
Forum: Plugins
In reply to: [ActiveCampaign Postmark for Wordpress] form submissions don’t sendfrom logs {“ErrorCode”:10,”Message”:”The Server Token you provided in the X-Postmark-Server-Token request header was invalid. Please verify that you are using a valid token.”}
I did the following but pagespeed is still complaining about the hubspot /forms/v2.js
https://pagespeed.web.dev/analysis/https-ubigro-com/ui720iprp9?form_factor=mobile
It is an issue on all of our clients’s websites that use embedded hubspot forms.
Another example is this site: https://pipphorticulture.com/
https://pagespeed.web.dev/analysis/https-pipphorticulture-com/jpjgbxasuf?form_factor=mobileCan you still help me?
Hello?
I updated the php file.
This code does not work when having multiple different forms on a page.<script> window.hsFormsOnReady = window.hsFormsOnReady || []; window.hsFormsOnReady.push(()=>{ hbspt.forms.create({ region: "na1", portalId: "8419634", formId: "d0de9b78-f8c6-4b96-b2fd-c2e78e483a5f", target: "#your-div-id", }) }); </script>
So I put it back to something like this:
<script charset="utf-8" type="text/javascript" src="https://js.hsforms.net/forms/embed/v2.js"></script> <script> hbspt.forms.create({ region: "na1", portalId: "8419634", formId: "96eaad71-152c-4ada-aba3-97b888373e9c" }); </script>
Can you provide code that does work
Pagespeed is no different:
https://pagespeed.web.dev/analysis/https-ubigro-com/jueczbgr89?form_factor=desktopThe file is now a php file https://ubigro.com/wp-content/uploads/2023/04/Screen-Shot-2023-04-03-at-2.07.12-PM.png
Here is an example of my current form code on a page do I need to change anything?<script> // override the hbspt functionality while hubspot is loading var hbspt = { //push form to hubcache queue forms:{create:function(c){hubspot.forms.push(c)}}, }; // cache hubspot forms here var hubcache = { forms:[], letsgo:function(){ for (var i in hubspot.forms){ //hubspot is now loaded hbspt.forms.create(hubcache.forms[i]); } } } </script> <script charset="utf-8" type="text/javascript" src="https://js.hsforms.net/forms/v2.js" defer></script> <script> hbspt.forms.create({ region: "na1", portalId: "8419634", formId: "d0de9b78-f8c6-4b96-b2fd-c2e78e483a5f" }); </script>
I also tried this code
<script> // override the hbspt functionality while hubspot is loading var hbspt = { //push form to hubcache queue forms:{create:function(c){hubspot.forms.push(c)}}, }; // cache hubspot forms here var hubcache = { forms:[], letsgo:function(){ for (var i in hubspot.forms){ //hubspot is now loaded hbspt.forms.create(hubcache.forms[i]); } } } </script>
and added defer to<script charset="utf-8" type="text/javascript" src="https://js.hsforms.net/forms/v2.js" defer></script>
but nothing is helping with page speed
https://pagespeed.web.dev/analysis/https-ubigro-com/aj5mru7dy0?form_factor=desktop
syntax error, unexpected ‘public’ (T_PUBLIC), expecting end of file
where do i look for that here? view-source:https://ubigro.com/
does it have to be a php file? I can only add an html file with wp file manager
https://ubigro.com/wp-content/uploads/2023/03/Screen-Shot-2023-03-29-at-3.33.45-PM.png
How do I know if it is working?
https://pagespeed.web.dev/analysis/https-ubigro-com/v5e0cimdl8?form_factor=desktop
- This reply was modified 1 year, 12 months ago by cp1132.
Can I add that to the functions.php?
is there a way to lazy load the hubspot script?
Version 10.1.6
Submitted ticket but haven’t heard back/