All Collections
Online Signup
Adding Custom Javascript to Online Signup
Adding Custom Javascript to Online Signup

Google Analytics, Facebook Pixel, Chat Widget

Alex Loeb avatar
Written by Alex Loeb
Updated over a week ago

If your marketing team is interested in tracking a prospect's journey from different marketing campaigns or channels, they can embed their tracking code on the Hint signup forms to track impressions, conversions and form abandonment in the analytics system you're already using (e.g. Google Analytics, FB Pixel, etc).

To insert your Javascript snippet:

  1. Navigate to "Admin" in the upper right menu bar.

  2. Select "Online Signup".

  3. In the text box under "Add Custom Javascript", paste in your code snippet.

  4. Click "Update" at the bottom of the page.

If you have more than one code snippet, you can enter all of them in this section. The code will run on all your retail signup pages.

If you receive an error for "Custom javascript is invalid" that means your code snippet contains non-Javascript code (e.g. HTML code like script tags). Please remove the non-Javascript code.

Example to add a script by url (i.e google tag manager)

(function(window, document){
function loadScript(src) {
return new Promise(function (resolve, reject) {
var s;
s = document.createElement('script');
s.src = src;
s.onload = resolve;
s.onerror = reject;
document.head.appendChild(s);
});
}

loadScript("https://www.js.com/script.js") // the script url
.catch((error) => { console.error(error); })
.then(() => {
console.log("loaded");
// your logic here
});

})(window, document);

Did this answer your question?