Created
October 16, 2025 16:30
-
-
Save HubSpotHanevold/6cd6af21c4e36abc50128c57705fa1e3 to your computer and use it in GitHub Desktop.
Identify page URL and assign a fairway company based on URL value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| window.addEventListener('load', function() { | |
| const url = window.location.href.toLowerCase(); | |
| const companyInput = document.querySelector('input[name="fairway_company_"]'); | |
| if (companyInput) { | |
| if (url.includes('agape')) { | |
| companyInput.value = 'Agape Lawn Company'; | |
| } else if (url.includes('fairway')) { | |
| companyInput.value = 'Fairway Lawns'; | |
| } else { | |
| companyInput.value = 'Arbor Bay'; | |
| } | |
| } | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment