• Hi, I have Passed the field User-EmailAddress from the form as URL query parameters to a thank you page where I want to use the parameter, in the instruction it’s written [get_param]! You can use this tag on the target page to collect the data transerred [get_param param="your-name"]. how do I insert this in the below js code

    
    <script>
    dataLayer.push({
        'event':'form_submit_enhance',
        'enhanced_conversion_data': {
          "email": [need the full email address here only]
          }
      })
    
    </script>

    do I simply add [get_param param="User-EmailAddress"] and it would work?

    • This topic was modified 2 years, 1 month ago by himanshudev.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You can simply use the shortcode like this:

    <script>
    dataLayer.push({
        'event':'form_submit_enhance',
        'enhanced_conversion_data': {
          "email": [User-EmailAddress]
          }
      })
    
    </script>

    This is exactly my issue as well – thanks

    But when I added the code

    
    <script>
    dataLayer.push({
        'event':'form_submit_enhance',
        'enhanced_conversion_data': {
          "email": [your-email]
          }
      })
    
    </script>

    `
    I got this
    Uncaught ReferenceError: your is not defined

    My get_param is [get_param param=”your-email”] and the email does appear in the website URL

    • This reply was modified 1 year, 11 months ago by neil677.
    • This reply was modified 1 year, 11 months ago by neil677.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to insert url query parameter in a script’ is closed to new replies.