Installation using JavaScript

Installing the Flamingo code snippet using JavaScript & HTML

Getting started with Flamingo takes a few minutes. First of all, sign up for a free account, or log in to your existing account and create a new Property. The property name, and associated ID, is assigned to each website or app within your Flamingo account. It helps you identify and differentiate between different properties that you're monitoring.

After creating the new Property, you'll then see the installation script to use. This script needs to be added to your website's HTML code to enable visitor data collection.

You can always revisit the installation instructions on the Property Settings page.

How do I add the Flamingo installation script to my website?

Depending on how your website is built, there are different ways to access its HTML code. If you have a content management system (CMS) like Webflow, WordPress, Joomla, or Drupal, you can usually add the code snippet using the admin panel. Otherwise, you'll need to access the HTML files directly on your web server via FTP or a code editor. Get some help from a technical member of your team if you need extra help.

  1. Decide where you want to insert the script. Typically, it should be placed just before the closing </head> tag in your HTML code. This ensures that the script is loaded early and starts tracking user activity as soon as possible.
  2. Open the HTML file of your website and locate the appropriate place to insert the tracking script. Insert the script within the chosen HTML tag. The script starts with <script> and ends with </script>. For best results, place it just before the closing  tag. You'll see also in the example below that you'll need to replace YOUR_PROPERTY_ ID with the ID of your own website Property that you've created in Flamingo.

<script defer src="https://cdn.flamingohq.app/flamingo.min.js" 
property-id="YOUR_PROPERTY_ID">
</script>
  1. After inserting the tracking script, save the changes to your HTML file and publish the site to make it live to visitors.
  2. Once you've added the tracking script, visit your website and navigate through different pages to generate some traffic. Then, return to your Flamingo dashboard and check if it's receiving data. It may take up to 30 seconds for data to be shown.

Once your website starts collecting data, explore the dashboard to gain insights about your website visitors, your traffic sources, and other relevant metrics. This information can help you optimize your marketing and make informed decisions.

What do I do if it's not working?

If you're sure the script is added correctly and still not seeing any data come through, use this article for some troubleshooting help.

Create your free account