There are two ways you can add CrowdHandler API script to your site.

If you have access to your html and/or templates you can add the script manually.

If you don't, or you prefer not to get your hands dirty, you can add the script using Google Tag Manager.

Getting your Public API key

In either instance you’ll need your Public API key.

To get your Public API key log in to https://admin.crowdhandler.com and go to your Account.

Click on API in the Account navigation.

You'll see your Public API key at the top of the screen.

You can either click on the clipboard to copy the Public API key or select the code and copy it.

Adding the script manually

Insert the following script tag into the head of all pages that you want to protect.

Replace <ch-public-key> with your Public API key.

<script src="https://wait.crowdhandler.com/js/latest/main.js?id=your-public-key"></script>

e.g. If your Public API key is 123456abcedf123456abcedf123456abcedf123456abcedf123456abcedf123 then your script tag will be 

<script src="https://wait.crowdhandler.com/js/latest/main.js?id=123456abcedf123456abcedf123456abcedf123456abcedf123456abcedf123"></script>
Note: It is important that this script is run as soon as possible so we recommend that you insert it before all other script tags 

Using Google Tag Manager

Google Tag Manager is a tag management system that makes adding HTML/JavaScript snippets to your website easier. We have created a dedicated GTM tag template that will help you start using CrowdHandler on your site without editing code.

This tag will apply CrowdHandler to your site, allowing us to handle the crowds and needs to be added only once.

Important: before you start, please make sure that Google Tag Manager is set up correctly on your website, according to the Google Tag Manager installation guide. Specifically, make sure that the <script> element of your Google Tag Manager container appears early on in the <head> section of your site, and the <noscript> element appears at the beginning of the <body> section.

Here’s how to install CrowdHandler on a website via Google Tag Manager:

1. Add a new tag

Open Google Tag Manager & click to add a New Tag.

In the Tag Configuration section click the Discover more tag types in the Community Template Gallery link.

Scroll down or use the search field to find CrowdHandler on the list.

On the next step, click the Add to workplace button and confirm adding the tag.

2. Connect to CrowdHandler

To connect your site to CrowdHandler, you need to specify your Public API key

Paste it into the Public API Key field in the Tag Template.

It’s important that this tag fires as soon as possible so open up the advanced settings and set the Tag firing priority to a high number.

In the Triggering section, choose to fire the tag on All Pages.

After choosing a name for your tag click the Save button. Then click the Submit button and choose Publish on the next screen to publish the changes.

That's it! The CrowdHandler script has been added to your site so we can handle the crowds and you can handle the sales!