Dealer Application Unique Tracking URLS [Sales]

Objective: Track Rep Firm/Internal Reps' performance toward quarterly dealer sign-up goals without relying on the dealer to self-report who referred them.

Strategy:

Streamline Tracking while maintaining a single, unified dealer application form. Marketing implemented a hidden dropdown field on the form that auto-fills based on a URL query parameter. This setup ensures clean data, minimizes manual steps, support scalable tracking as contacts/partners change or grow, and removes the need for dealer input while keeping rep attribution accurate and centralized.

How it Works:

  • Each Sales Rep/Partner firm is assigned a unique referral link
  • When a dealer clicks the link, a JavaScript snippet reads the referral value from the URL and selects the matching internal value in the form's hidden dropdown.
  • The selected value is stored in the Contact record under a dedicated field for reporting and automation.

Live Example: URL query Autofills Dropdown Field

Note: The Internal Sales Source (Dealer Ap) field is hidden from view. It was temporarily unhidden for demonstration purposes in this video.

URL References:

See Below to create new or modify Properties and Tracking URLs

Any internal sales source, rep firm, partner, or other contact who consistently drives dealers to apply should have a dedicated tracking URL.

The table below outlines the setup for each rep source currently configured:

  • The label and internal name used in the HubSpot Property
  • The query parameter used to trigger the autofill
  • The unique value expected from the URL
  • The URL to share with those driving traffic to the form, which pre-fills the hidden field on the Dealer Application form.
HS Property Label HS Property Internal Name Query Name Query Value Unique URL

ALR Associated Lighting

alr-associated-lighting referral alr-associated-lighting https://web.icrealtime.com/dealer-application?referral=alr-associated-lighting

Atlantic Integrated

atlantic-integrated referral atlantic-integrated https://web.icrealtime.com/dealer-application?referral=atlantic-integrated
CI Partners ci-partners referral ci-partners https://web.icrealtime.com/dealer-application?referral=ci-partners
LK & Associates lk-and-associates referral lk-and-associates https://web.icrealtime.com/dealer-application?referral=lk-and-associates
Momentum Group momentum-group referral momentum-group https://web.icrealtime.com/dealer-application?referral=momentum-group
Morris Tait Associates morris-tait-associates referral morris-tait-associates https://web.icrealtime.com/dealer-application?referral=morris-tait-associates
MS Wired ms-wired referral ms-wired https://web.icrealtime.com/dealer-application?referral=ms-wired
Network Sales & Mktg network-sales-and-mktg referral network-sales-and-mktg https://web.icrealtime.com/dealer-application?referral=network-sales-and-mktg
NuTech Group nutech-group referral nutech-group https://web.icrealtime.com/dealer-application?referral=nutech-group
Precision Sales Group precision-sales-group referral precision-sales-group https://web.icrealtime.com/dealer-application?referral=precision-sales-group
Rio Grande Rep Company rio-grande-rep-company referral rio-grande-rep-company https://web.icrealtime.com/dealer-application?referral=rio-grande-rep-company
Access Reps access-reps referral access-reps https://web.icrealtime.com/dealer-application?referral=access-reps
Orion Advanced orion-advanced referral orion-advanced https://web.icrealtime.com/dealer-application?referral=orion-advanced
RS Pro Sales #8 rs-pro-sales-8 referral rs-pro-sales-8 https://web.icrealtime.com/dealer-application?referral=rs-pro-sales-8
RS Pro Sales #9 rs-pro-sales-9 referral rs-pro-sales-9 https://web.icrealtime.com/dealer-application?referral=rs-pro-sales-9
Electrical Materials Inc (EMI) electrical-materials-inc referral electrical-materials-inc https://web.icrealtime.com/dealer-application?referral=electrical-materials-inc
Polaris Controls polaris-controls referral polaris-controls https://web.icrealtime.com/dealer-application?referral=polaris-controls
Jesus F Solis jesus-solis referral jesus-solis https://web.icrealtime.com/dealer-application?referral=jesus-solis
Savvy Holdings LLC savvy-sales-and-marketing referral savvy-sales-and-marketing https://web.icrealtime.com/dealer-application?referral=savvy-sales-and-marketing
Braxton Heise braxton-heise referral braxton-heise https://web.icrealtime.com/dealer-application?referral=braxton-heise
Dave Greenfeld dave-greenfeld referral dave-greenfeld https://web.icrealtime.com/dealer-application?referral=dave-greenfeld
Dean Morgan dean-morgan referral dean-morgan https://web.icrealtime.com/dealer-application?referral=dean-morgan
Eric Pineda eric-pineda referral eric-pineda https://web.icrealtime.com/dealer-application?referral=eric-pineda
Ian Sossen ian-sossen referral ian-sossen https://web.icrealtime.com/dealer-application?referral=ian-sossen
John Edens john-edens referral john-edens https://web.icrealtime.com/dealer-application?referral=john-edens
Louis Digioia louis-digioia referral louis-digioia https://web.icrealtime.com/dealer-application?referral=louis-digioia
Michael Iacovone michael-iacovone referral michael-iacovone https://web.icrealtime.com/dealer-application?referral=michael-iacovone
Mike Menendez mike-menendez referral mike-menendez https://web.icrealtime.com/dealer-application?referral=mike-menendez
Michael Nash michael-nash referral michael-nash https://web.icrealtime.com/dealer-application?referral=michael-nash
Robert Bucciarelli robert-bucciarelli referral robert-bucciarelli https://web.icrealtime.com/dealer-application?referral=robert-bucciarelli
Robert Travinski robert-travinski referral robert-travinski https://web.icrealtime.com/dealer-application?referral=robert-travinski
Roman Odierna roman-odierna referral roman-odierna https://web.icrealtime.com/dealer-application?referral=roman-odierna
Shaun Bishop shaun-bishop referral shaun-bishop https://web.icrealtime.com/dealer-application?referral=shaun-bishop
Susie Goff susie-goff referral susie-goff https://web.icrealtime.com/dealer-application?referral=susie-goff
Thomas Brochard thomas-brochard referral thomas-brochard https://web.icrealtime.com/dealer-application?referral=thomas-brochard
Donna Salmon donna-salmon referral donna-salmon https://web.icrealtime.com/dealer-application?referral=donna-salmon
Jacqueline DeSantis jacqueline-desantis referral jacqueline-desantis https://web.icrealtime.com/dealer-application?referral=jacqueline-desantis
Jeff Chance jeff-chance referral jeff-chance https://web.icrealtime.com/dealer-application?referral=jeff-chance

Creating or Modifying Properties, URLs, & Script Logic

Property Set Up

🚩 These Steps are only for modifying the existing Internal Sales dourest (Dealer-App) property, not for creating a new property. A new property should only be created if the use case cannot be supported by the existing one.

Property Name: Internal Sales Source (Dealer App)

A Unique custom property was created under the Contact Object in HubSpot to simplify reporting setup and ensure reliable field mapping. Follow the steps below if you need to create a new unique tracking URL tied to this property:

HubSpot Settings

  1. Go to Settings> Properties, then filter your the Contact object.
  2. Search for and select the property called, Internal Sales Source (Dealer App).
  3. Scroll to the Dropdown options section and click the "Add an option." button.
    1. Label: The name that will display in reports and dropdown (e.g., Access Reps)
    2. Internal Value: Must match the exact query value used in the URL (e.g., access-reps).

Important: 

  • Keep the internal name format separated by hyphens and all lowercase
    • Example: firstname-lastname, partner-firm-company
  • The internal values of the drop down options must match the URL Parameter values exactly.
    • Example: If the URL is ?referral=dean-morgan, the internal dropdown value must by dean-morgan


Including Property to Dealer Application Form

⚠️This step is only necessary when adding a brand-new property to the system. If you're simply updating or modifying values within the existing property, you do not need to re-add the field to the form.

Once the custom property internal_sales_source_dealer_app was created, and it was added to the existing Dealer Application Form in HubSpot to support the automatic population via URL

Steps:

  • Go to Marketing > Lead Capture > Forms in HubSpot
  • Locate and Edit the Dealer Application Form
  • In the left sidebar, search for the field:
    • Internal Sales Source (Dealer-App)
    • Drag the field into the form
    • Click the field and choose "Hidden Field" so it will be hidden from users filling out the form
  • Save and Publish the updated form

This allows the JavaScript to match the referral value from the URL with a dropdown option and set it in the background, without user input.

Creating / Updating URL Queries

To dynamically pre-fill the rep firm field on the dealer application form, we use smart rules in HubSpot based on URL query parameters. This allows personalized form experiences depending on which rep shared the link

  • Go to the landing page in HubSpot where the form is embedded.
  • Click on the form
  • On top of the open panel on the left, you'll see "Smart Rules."
  • Click on Manage

Important:

  • Always set th parameter name to: referral
  • Ensure the query value matches the internal property name
  • Example: 
    • Internal Name = alr-associated-lighting
    • URL Paramater = partner =alr-associated-lighting

Screenshot 2025-06-17 at 8.42.41 PM

URL Value: 

https://web.icrealtime.com/dealer-application?referral=alr-associated-lighting

Modifying the JavaScript Query:

⚠️ Only Update the JavaScript if:

A New property is created (with a new internal name)

The query parameter changes (e.g., from referral to something else)

The script needs to be added to a new landing page that doesn't already have it

Use this ChatGPT Prompt:

This prompt is already configured with the necessary information provided below.

 

I'm working with a HubSpot form that includes a dropdown field. I want the dropdown to automatically select a value based on a query parameter in the page URL.

The dropdown's internal field name is internal_sales_source_dealer_app, and the query parameter is called referral (e.g., referral=alr-associated-lighting).

Please Generate a JavaScript snippet that:

  • Works with dynamically loaded HubSpot forms (via MutationObserver)
  • Waits until the form and field are fully loaded
  • Sets the dropdown value if a match is found
  • Avoids naming conflicts with other scripts on the pages
  • Logs success/failure clearly in the browser console

Once the JavaScript is generated/updated, it's inserted into the landing page's settings:

Current JavaScript Used (July 2025)

<script>
  const REFERRAL_PARAM = new URLSearchParams(window.location.search).get("referral");
  const REFERRAL_FIELD = "internal_sales_source_dealer_app";

  function setDropdownFieldValue() {
    const dropdown = document.querySelector(`select[name="${REFERRAL_FIELD}"]`);
    if (!dropdown) {
      console.warn("❌ Dropdown not found.");
      return;
    }

    if (REFERRAL_PARAM) {
      const match = dropdown.querySelector(`option[value="${REFERRAL_PARAM}"]`);
      if (match) {
        dropdown.value = REFERRAL_PARAM;
        dropdown.dispatchEvent(new Event("change", { bubbles: true }));
        console.log(`✅ Set dropdown to: "${REFERRAL_PARAM}"`);
      } else {
        console.warn(`⚠️ Value "${REFERRAL_PARAM}" not found in dropdown options.`);
      }
    } else {
      console.warn("⚠️ No referral param in URL — dropdown left blank.");
    }

    // Visually disable the field without actually disabling it
    dropdown.setAttribute("readonly", true); // not officially valid on select but safe
    dropdown.style.pointerEvents = "none";
    dropdown.style.backgroundColor = "#f9f9f9";
    dropdown.style.color = "#555";
    dropdown.style.opacity = "0.8";
    console.log("🔒 Dropdown visually locked (readonly workaround).");
  }

  function waitForReferralDropdown() {
    const observer = new MutationObserver(() => {
      const dropdown = document.querySelector(`select[name="${REFERRAL_FIELD}"]`);
      if (dropdown) {
        setDropdownFieldValue();
        observer.disconnect();
      }
    });

    observer.observe(document.body, {
      childList: true,
      subtree: true
    });
  }

  document.addEventListener("DOMContentLoaded", waitForReferralDropdown);
</script>

Troubleshooting Shortcuts:

Dealer Application Set Up:

Live Page

Dealer Application Link to Dealer App (Located on Website Footer)
Landing Page Dealer Application Link to Edit Page
Form Dealer Application Form

Link to Edit Form

Property Internal Sales Source (Dealer-App) Link to Add Properties

Post Application Submission Workflow Triggers

Operational Workflows:

Workflow Internal Vetting 1.0 | Operations Vetting | Dealer Application Submitted | Assign Contact Owner Creates Deal Record & Task to Review Application - Assign to Jerrold Effron
Workflow Internal Record Updates 2.0 | Operations Vetting | Dealer Application Approved | Assign Company/Contact Owner Sets record with data based on assigned Sales Executive
Workflow Internal Record Updates & External Communication 3.0 | New Dealer Pipeline | Dealer Application Approval | Set Deal Stage Communicates new approved dealers to sales leaders and sends welcome email from CEO to dealer

Onboarding Workflows:

Workflow (Internal Record Updates) 4.0.1 | New Dealer Pipeline | Assign Onboarding Agent Assigns Onboarding Agent to Trigger 1:1 Onboarding Invitation
Workflow External Communication 4.1 | New Dealer Pipeline | Dealer Application Approved | Schedule Onboarding Triggers email from onboarding agent to customer to scheduled their onboarding (with reminder emails)
Workflow (Internal Communication) 4.1 | New Dealer Pipeline | Onboarding Scheduled | Create Task Onboarding scheduled via meeting link, task is assigned to agent
Workflow (External Communication) 4.2 | New Dealer Pipeline | Reschedule Onboarding 09.30.24 If Dealer does not attend scheduled onboarding, an email is sent to dealer to reschedule
Workflow (Internal Communication) 4.3 | New Dealer Pipeline | Rescheduled Onboarding Task Onboarding rescheduled via meeting link, task is assigned to agent
Workflow (External Communication) 5.0 New Dealer Pipeline | Onboarding Completed/Next Steps 10.01.24 Onboarding completed, email sent to dealer with the next steps
Workflow (External Communication) 5.1 New Dealer Pipeline | Onboarding Completed 60 day Follow-Up Workflow 10.09.24
Post Onboarding l Sends Dealer 90-Day Checkin Email 1:1 from Onboarding Agent
Post Onboarding Survey External Communication 5.2 Post Onboarding Survey l Customer Success
 
Post Onboarding l Sends Survey