The MadKudu snippet is a few lines of code that you add to your website to personalize forms and web pages depending on who your visitors are. For example, you can show a specific offer to leads that are qualified for a sales consultation.
The MadKudu snippet added on your website will load a personalized madkudu.js script which will essentially make a call to the MadKudu API to return a score based on the email of the visitor.
If you have installed an analytics or tracking tool like Google Analytics, Amplitude, Segment, Mixpanel..., this should be familiar to you and you may have had to install these tools JS snippet on your website already.
How to set it up?
You can install the MadKudu snippet on your website with either:
- Segment (no code install)
- Google Tag Manager
- Manually with your website editor (webflow, wordpress...) or custom code
We recommend installing the MadKudu snippet via Segment. This takes just a few clicks and no code is required. (You can find the details of the steps below in this article.) Segment will load the madkudu.js automatically
Install MadKudu JS with Segment
- You have a MadKudu account
- You have access to your Segment account
Segment is an API manager that allows you to easily turn on or off third-party code snippets in their applications.
MadKudu JS will be installed on sites/pages where Segment is installed and where Segment's identify method is called.
- Segment will send the user email to MadKudu, MadKudu will return a score.
To install MadKudu JS to Segment, follow the instructions here to connect Segment to MadKudu
- connecting your website (which should be a Segment source)
- adding MadKudu as a destination
If Segment is not an option, it will take a developer a few minutes and up to an hour to install the snippet manually on your website.
Google Tag Manager can sometimes be a good solution if it is already installed on your site.
Install MadKudu JS with GTM or manually
- You have a MadKudu account
- You have access to Google Tag Manager or your website code (or a friendly developer :))
Step 1: Get the MadKudu snippet code
- Log in to your MadKudu account app.madkudu.com
- Go to Integrations
- Select and copy the snippet
Step 2: Install the snippet on your website
Option 1: Using Google Tag Manager
- Log into your Google Tag Manager account
- Go to the Create a custom tag
- Paste the MadKudu snippet
- Choose the pages you want the snippet to appear on
- Click Save
Option 2: Manually
</head>tag on every page you want MadKudu to personalize your visitor experience.
Step 3: Test that the MadKudu snippet is live
- Open one of your website pages where you added the snippet
- Test that the MadKudu snippet can be called by typing “madkudu” in the console
Once it loads, you’re done! The MadKudu snippet is now live on your site.
Special case: your signup form is inside an iframe
If your signup form is within an iframe (as is the case with forms from Pardot, HubSpot or others), the form cannot access the inside of the iframe.
To solve the issue, you will also need to install the snippet inside the iframe. Please refer to the instructions above to get your snippet and add it to your iframe code.