Herefish Integration Setup: Required Script Fixes

Created by Mark Alfon, Modified on Wed, 21 May at 10:52 AM by Mark Alfon

Herefish Integration Setup: Required Script Fixes

When integrating Herefish with websites, two key adjustments must be made to ensure the automation script runs successfully.


? Required Fixes

1. ✅ Tick the “Go” Checkbox

In the Herefish integration UI, ensure the “Go” checkbox is checked. This is essential for the automation to execute.


2. ✅ Wrap the API URL in Quotes

The window.hfDomain value must be wrapped in double quotes (" "). Without quotes, the script will break, especially if the code is copied from or sent via email.


? Sample Script (Provided by Client – Incorrect)

<script type="text/javascript"> window.hfAccountId = "c6eb33e0-25f6-4ac5-92cc-718028eb6bf6"; window.hfDomain = https://api.herefish.com; (function() { var hf = document.createElement('script'); hf.type = 'text/javascript'; hf.async = true; hf.src = window.hfDomain + '/scripts/hf.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(hf, s); })(); </script>

✅ Corrected Script (With Fix Applied)

<script type="text/javascript"> window.hfAccountId = "c6eb33e0-25f6-4ac5-92cc-718028eb6bf6"; window.hfDomain = "https://api.herefish.com"; (function() { var hf = document.createElement('script'); hf.type = 'text/javascript'; hf.async = true; hf.src = window.hfDomain + '/scripts/hf.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(hf, s); })(); </script>

⚠️ Why This Matters

  • Unquoted URLs (like https://api.herefish.com) may be stripped or altered by some email clients or CMS interfaces.

  • Incorrect setup can result in silent script failures and integration issues.


✅ Summary

RequirementAction
“Go” checkbox✅ Must be ticked
API URL in script✅ Must be wrapped in double quotes

? Pro Tip

  • When sharing scripts, send them as plain text or code blocks to avoid formatting loss via email.

  • Always review the script before publishing to ensure proper syntax.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article