📚 Web Form Attribution Series - Part 3 of 3
Part 1: Web Form Attribution Tracking - Implementation guide
Part 2: JavaScript Overview - Understanding the JavaScript
Part 3: JavaScript Testing Guide (you are here)
This Document Will Cover:
Quick Reference for Technical Users
Clear everything:
imt.clearCache();
+ clear local storageSet UTMs:
?utm_medium=medium1...
then?utm_medium=medium2...
Inspect form: Search for "medium1" (First-Click) and "medium2" (Last-Click)
Submit with unique email:
YYYYMMDD_HHMM@domain.com
Verify in Salesforce: Lead → Engagement record
Debug in browser console:
imt.enableDebug();
(enable) |imt.clearCache();
(clear cache)For detailed step-by-step instructions, continue below.
Prerequisites
Integrous JavaScript must be installed on all pages being tested
Hidden form fields must be present on forms (see Web Form Attribution Tracking guide)
Access to Salesforce to verify results
Marketing Automation Platform sync enabled
Basic familiarity with browser developer tools
Initial Setup and Cache Clearing
Step 1: Complete Browser Reset
Close all tabs for all domains and sub-domains related to the customer anywhere on your computer
Open each domain and sub-domain you plan on testing in separate tabs
Step 2: Clear Cache and Storage for Each Tab
Complete the following steps in each tab you opened:
Right-click anywhere on the page and click 'Inspect Element' to open developer tools
Right-click the 'Refresh' icon in the browser next to the URL bar and select "Empty Cache and Hard Reload"
Go to the Console tab in the developer tools
Type:
imt.clearCache();
Hit ENTER
Go to the Application tab in the developer tools
Navigate to Local Storage in the left sidebar
Right-click and select 'Clear' for each entry in the local storage
Testing Multiple Domains/Subdomains
If testing cross-domain tracking:
Test each domain/subdomain separately first
Then test navigation between them to verify attribution persists
For subdomains (e.g., blog.company.com, www.company.com), the JavaScript should automatically share data
Note: For cross-domain tracking to work, Integrous must configure each domain for you in the JavaScript settings.
Core Attribution Testing
Step 3: Primary UTM Test
Set First Attribution:
Copy/paste the following to the end of the URL you'd like to test:
?utm_medium=medium1&utm_source=source1&utm_campaign=campaign1&utm_content=content1&utm_term=term1
Hit ENTER
Set Second Attribution:
Replace the query string with this new query string:
?utm_medium=medium2&utm_source=source2&utm_campaign=campaign2&utm_content=content2&utm_term=term2
Hit ENTER
You've now stored two sets of UTMs in your browser's local storage
Step 4: Form Field Verification
Navigate to the form you'd like to test
Right-click anywhere on the page with the form and click "Inspect Element" to open developer tools
Click on the Elements tab in the developer tools if it's not already selected
Visual Verification in Developer Tools
Command+F on Mac or Ctrl+F on Windows and search for "medium1"
Confirm it corresponds to the First-Click (FC) Medium hidden field
Look for field names like:
IA_-_PROCESSING_FC_UTM_MED__c
Command+F on Mac or Ctrl+F on Windows and search for "medium2"
Confirm it corresponds to the Last-Click (LC) Medium hidden field
Look for field names like:
IA_-_PROCESSING_LC_UTM_MED__c
Verify these fields contain your test UTM values
Step 5: Form Submission and Tracking
Submit the form, using a new unique email address
Format:
YYYYMMDD_HHMM[AM/PM]@[your domain].com
Example:
20240911_1228pm@integrousanalytics.com
Salesforce Verification
Step 6: Salesforce Data Validation
Wait for Processing: Give time for the Marketing Automation Platform to process that information and sync to Salesforce
Find the Lead: Search for the lead with that email address in Salesforce
Check Engagement Record: Click on the Engagement record associated with that lead
Confirm All Fields: Verify all the fields set by the JavaScript captured the info you expect to find:
Five 'First-Click' (FC) UTMs and External ID
Five 'Last-Click' (LC) UTMs and External ID
Entry Page
Conversion Page
Additional Test Scenario - Cross-Domain Navigation
Start on one domain with UTMs
Navigate to subdomain
Submit form on subdomain
Verify attribution persists across domains
Advanced Debugging
Enable Debug Mode
Enable Debug Through the Developer Console:
Open the Developer Console in your browser (usually accessible via F12 or Ctrl + Shift + I)
Run the function: Enter
imt.enableDebug();
in the console and press ENTERRefresh the page to apply the changes
Repeat this step for each subdomain if needed
To disable debug mode, clear the local storage value
debug-mode
Complete Cache Clearing
To fully clear the cache for a subdomain, run the following command in the browser's developer console:
imt.clearCache();
Troubleshooting Common Issues
JavaScript Not Loading
Check browser console for errors
Verify GTM is firing on the page
Confirm JavaScript tag is set to fire on "All Pages"
Hidden Fields Not Populating
Verify field names match JavaScript configuration
Check if form is in an iframe (requires special setup)
Confirm fields are not pre-populated with values
Ensure form fields are actually hidden (not just invisible)
Attribution Not Reaching Salesforce
Check Marketing Automation Platform field mapping
Verify "Processing" fields are being populated
Check Salesforce user permissions
Confirm MAP sync is enabled and running
Ensure field mapping between the MAP and Salesforce is configured correctly
Cross-Domain Issues
Verify all domains are configured in JavaScript settings
Check that JavaScript is installed on all domains/subdomains
Expected Processing Times
JavaScript populates fields: Immediate
MAP sync to Salesforce: 5-15 minutes (varies by platform)
Engagement record creation: Immediate upon MAP sync completion
Testing Checklist
JavaScript loads without console errors
Hidden fields populate with correct UTM values
Form submission successful
Lead created in Salesforce with unique email
Engagement record created and linked to Lead
All attribution fields populated correctly
First-click attribution shows "medium1, source1, campaign1, content1, term1"
Last-click attribution shows "medium2, source2, campaign2, content2, term2"
Entry Page and Conversion Page URLs captured
Cross-domain tracking works (if applicable)