▼Purpose
I would like to use Google form embedded in the inquiry page on the homepage, but I would like to transfer to a specific page (thanks page) after submit to measure the number of inquiries completed by Google Analytics.
▼What I checked
I think the following two sites are related.
·Wisdom bag
https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q14161605959
·hello-world.jp.net
https://blog.hello-world.jp.net/javascript/878/#i-2
▼What you did after checking
①Fill in the HTML entry field of the inquiry page https://example.com/contact with the following Google form tags.The contact form has been verified to be properly embedded.
<iframe src="https://docs.google.com/forms/d/e/~~~/viewform?embedded=true" width="640" height="1634" frameborder="0" marginwidth="0" marginheight="0">loading...</iframe>
サン Using the Sunks page as https://example.com/thanks as a reference, create the following code.
<script type="text/javascript">var submitted=false;</script>
<iframe name="hidden_iframe" id="hidden_iframe"
style="display:none;"onload="if(submitted)
{window.location='http://example.com/thanks'}"></iframe>
<form action="https://example.com/thanks" method="POST" id="ss-form"
target="hidden_iframe" onsubmit="submitted=true">
▼Question
Q1. Where should I attach the above code?
Q2. Is the above code correct?
I'm sorry to ask you such an amateur question, but I appreciate your cooperation.
google-apps-script
<script type="text/javascript">var submitted=false;</script>
<iframe name="hidden_iframe" id="hidden_iframe"
style="display:none;"onload="if(submitted)
{window.location='http://example.com/thanks'}"></iframe>
Stick the inside of the head
<form action="here's the Google form URL" method="POST" id="ss-form"
target="hidden_iframe" onsubmit="submitted=true">
is in the body, but paste the URL of the form in action.
Also, please extract the numeric part of entry.012345
← from the site and put it in the tag part of input like name="entry.012345"
.
I think it works like that.
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
578 Understanding How to Configure Google API Key
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.