User is redirected to a Hubspot-hosted confirmation page, which contains a Google form
Hubspot autofills some form fields in the Google form, including the hs_object_id
Sometimes the completed Google form data shows the hs_object_id as null. I am almost certain this is a Hubspot issue, as we have just recently moved to Google forms from Jotform, and we had the same issue with Jotform too.
My suspicion is that the object_id hasn’t actually been assigned in time for when the form loads. Could this be the case, if so, what is the recommended solution? It seems to only be this property which has a null value, we haven’t seen this with any of the other handful of properties which we also pass into the form.
If it matters, the Google form is in an embedded iframe and the parameters are passed in via the iframe’s src property.
If anyone sends a test submission, please let me know as this is all in production at the moment. Also please make it obvious that the submission is a test!
I have a hunch that you are correct in terms of the property not having an assigned value, yet. I believe @stefen recently shared some advice about this…not recalling which post it was, though
Apologies for the delay in jumping in here, but if you want to add 2 second delay this is a pretty simple way to do that. Add this to your thank you page and for 2 seconds after the redirect it will display a loading spinner before it refreshes again:
{% if request.query is string_containing "submissionGuid" %}
{# give hubspot time to populate it's database after a user submits new data in order to ungate the page #}
<div class="loading-spinner">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M456.433 371.72l-27.79-16.045c-7.192-4.152-10.052-13.136-6.487-20.636 25.82-54.328 23.566-118.602-6.768-171.03-30.265-52.529-84.802-86.621-144.76-91.424C262.35 71.922 256 64.953 256 56.649V24.56c0-9.31 7.916-16.609 17.204-15.96 81.795 5.717 156.412 51.902 197.611 123.408 41.301 71.385 43.99 159.096 8.042 232.792-4.082 8.369-14.361 11.575-22.424 6.92z"/></svg>
</div>
<script>
setTimeout(function(){
window.location = window.location.pathname;
}, 2000);
</script>
{% endif %}