Once you've created your account and setup your organization and site, it's time to install Darwin's tracking script. Darwin is installed in the typical fashion, using an HTML snippet, that can be added via your code or with a tag manager.
The tracking snippet for Darwin looks like this:
Your siteId and tracking script will be generated for you once you've logged in and created an organization with a site.
If you've done this, you should be able to see your tracking script at this url.
To install this script, all you need to do is add it to the HTML of your website. Which means you can either "hard-code" it by adding it directly to your HTML, or you can use a tag manager. Tag managers, like GTM, have become a common way of managing and coordinating various marketing tags on websites.
If you plan on using Darwin for AB testing and analytics then you should install the snippet on the top of your site's HTML. The reason for this is because this allows the script to perform text and UI replacement before the page loads for the end user.
As Darwin's script is served by a world class static hosting CDN (Amazon AWS), there should be little concern about loading performance and implications on performance. However, if performance is a concern, you may want to install the script via your site's body.
If you want to minimize the loading considerations for the Darwin script, you can install it in the body of your site, before the footer. This is how tag managers will load it by default.
Alternatively, you can add a
defer attribute to the tag as follows:
<script src="https://s.darwin.to/YOUR_SITE_ID.js" defer></script>
Darwin uses AWS to host and serve the tracking script globally. It is also optimized for rapid loading. In most cases we recommend installing the script without a tag manager (which forces the script to the footer) and in the
head of your HTML. This will give you the "best" Darwin experience possible.
If you still have some questions on how Darwin should be installed using your favorite website creation tool, we've prepared some installation guides for popular tools.