Skip to main content

URL Parameter Goal Tracking Implementation Guide

This guide explains how to modify your forms to add URL parameters upon successful submission, enabling Wisepops goal tracking without JavaScript snippets or Google Tag Manager.

Updated today

Overview

This guide explains how to modify your forms to add URL parameters upon successful submission, enabling Wisepops goal tracking without JavaScript snippets or Google Tag Manager.

How It Works

Instead of the URL remaining unchanged after form submission, you'll add a parameter that Wisepops can detect:

  • Before: https://www.yoursite.com/contact

  • After: https://www.yoursite.com/contact?form=success

Implementation Options

Option 1: Universal Form Success Parameter (Recommended)

Add the same parameter to ALL form completions across your site:

?form_completed=true

Benefits:

  • One Wisepops goal tracks all form completions

  • Simple to implement across all forms

  • Easy to maintain

Option 2: Specific Form Type Parameters

Add different parameters based on form type:

?form=demo_request 
?form=whitepaper_download
?form=contact_sales
?form=event_registration

Benefits:

  • Track different conversion types separately

  • More granular reporting

  • Can assign different values to each form type

Technical Implementation Steps

For Your Web Development Team:

1. Server-Side Redirect Method (Most Reliable)

After form processing, redirect to the same page with parameter:

// PHP Example
header("Location: /contact?form=success");

// Node.js Example
res.redirect('/contact?form=success');

// Python/Django Example
return redirect('/contact?form=success')

// Or for PDF downloads
header("Location: /contact?form=success&asset=downloaded");

2. JavaScript Form Handler Method

If using JavaScript form submission:

javascript

// After successful form submission
function onFormSuccess() {
// Add parameter to current URL
const url = new URL(window.location);
url.searchParams.set('form', 'success');

// Update URL without page reload
window.history.replaceState({}, '', url);

// Or redirect with parameter
window.location.href = url.toString();
}

3. Thank You Page Method

Create dedicated thank you pages with consistent URL pattern:

/thank-you/demo-requested 
/thank-you/whitepaper-downloaded
/thank-you/contact-submitted

Special Case: PDF Downloads

For PDF downloads after form submission, implement a two-step parameter:

javascript

// Step 1: Mark form as completed window.location.href = "/resources?form=completed";

// Step 2: Trigger PDF download setTimeout(() => { window.open("/media/documentation/file.pdf", "_blank"); }, 500);

Wisepops Goal Configuration

Once implemented, configure goals in Wisepops:

Universal Goal Setup:

  • Goal Name: Form Completion

  • Goal Type: URL of success page

  • Condition: Contains

  • Value: form=success or form_completed=true

Specific Goal Setup:

  • Demo Requests: URL contains form=demo_request

  • Content Downloads: URL contains form=whitepaper_download

  • Contact Forms: URL contains form=contact_sales

Testing Checklist

  1. ✅ Submit test form and verify parameter appears in URL

  2. ✅ Check parameter persists for at least 5 seconds

  3. ✅ Verify no page errors or console warnings

  4. ✅ Test on mobile devices

  5. ✅ Confirm parameter doesn't interfere with other tracking (GA, etc.)

Common Implementation Patterns

Here are typical implementations across different form types:

Pattern 1: Contact Form

Current: https://www.yoursite.com/contact-us 
After submission: https://www.yoursite.com/contact-us?form=success

Pattern 2: Resource Download

Current: https://www.yoursite.com/resources/[resource-name] 
After submission: https://www.yoursite.com/resources/[resource-name]?asset=downloaded

Pattern 3: Demo Request

Current: https://www.yoursite.com/products/[product]/demo 
After submission: https://www.yoursite.com/products/[product]/demo?demo=requested

Pattern 4: Newsletter Signup

Current: https://www.yoursite.com/blog 
After submission: https://www.yoursite.com/blog?newsletter=subscribed

Pattern 5: Event Registration

Current: https://www.yoursite.com/events/[event-name] 
After submission: https://www.yoursite.com/events/[event-name]?registration=complete

Fallback Solution

If URL modification isn't possible, consider using anchor parameters (won't affect server-side processing):

https://www.yoursite.com/contact#form-success

Implementation Timeline

  1. Phase 1 (Week 1): Implement on one test form

  2. Phase 2 (Week 2): Validate with Wisepops goal tracking

  3. Phase 3 (Week 3): Roll out to all priority forms

  4. Phase 4 (Week 4): Complete implementation across site

Support

For questions about:

  • Implementation: Contact your web development team

  • Wisepops configuration: Reach out to your Wisepops Customer Success Manager

  • Testing: Validate in your Wisepops dashboard analytics section

Notes for Your Development Team

  • Parameters should persist for at least 5 seconds for Wisepops to detect

  • Use URL encoding for special characters

  • Consider adding timestamp to prevent caching issues: ?form=success&t=1234567890

  • Parameters won't affect SEO if implemented correctly

  • Can coexist with existing UTM parameters

Best Practices

Do's:

✅ Use consistent parameter naming across your site

✅ Test in multiple browsers and devices

✅ Document your parameter structure for future reference

✅ Consider user privacy when choosing parameter names

✅ Implement incrementally to minimize risk

Don'ts:

❌ Don't use personally identifiable information in parameters

❌ Don't create parameters that conflict with existing tracking tools

❌ Don't forget to URL-encode special characters

❌ Don't implement on production without testing

❌ Don't use parameters that might be stripped by security tools

Integration with Common Platforms

WordPress

Use plugins like "Redirection" or add to functions.php:

php

add_action('gform_after_submission', 'add_success_parameter', 10, 2);

HubSpot

Configure in Forms > Options > Redirect URL with parameters

Marketo

Set up in Form Settings > Settings > Thank You Page URL

Salesforce/Pardot

Configure in Form Completion Actions > Redirect URL


This approach eliminates the need for JavaScript snippets in GTM and provides a cleaner, more maintainable solution for goal tracking across your entire site.

Did this answer your question?