How to install the MadKudu snippet on your website?

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. 

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 

  • 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

  1. connecting your website (which should be a Segment source)

  2. 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 :)) 

  1. Log in to your MadKudu account app.madkudu.com 

  2. Go to Integrations 

  3. Click on JS (JavaScript) mceclip0.png

  4. Select and copy the snippet mceclip1.png

 

  1. Log into your Google Tag Manager account

  2. Go to the Create a custom tag

  3. Paste the MadKudu snippet

  4. Choose the pages you want the snippet to appear on

  5. Click Save

 

  1. Paste the javascript snippet before the </head> tag on every page you want MadKudu to personalize your visitor experience.

 

  1. Open one of your website pages where you added the snippet

  2. Open the Javascript console 

  3. 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.

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.