How can I modify URLs for better Google Analytics tracking?

Topic summary

A user wants to modify URLs to track form submissions in Google Analytics, specifically for pages like “thanks for your submission” and contact forms.

Solution Provided:

  • Use the return_to parameter to set a redirect URL after successful form submission
  • Implementation involves adding the parameter to the form code

Code Example:
A code snippet was shared showing how to structure the form with the return_to parameter, though the exact syntax appears corrupted in the thread.

Status: The question has received a potential solution, but confirmation of whether it resolved the issue is pending.

Summarized with AI on November 21. AI used: claude-sonnet-4-5-20250929.

I want to find out how to change the URL to thanks for your submission, etc. I want to change the URL to keep track of every submission submitted in our Google Analytics. We also have a contact us on almost every other page and want to know how to keep track of that by changing the URL.

Hi,
I hope you are doing well.
You can set redirect url after success using return_to parameter

{% form 'form_type', return_to: url %}
  content
{% endform %}

Please check if it helps you.
Thanks!