Some custom scripts that you want to add to your career site will also set cookies in the visitor's browser. When this is the case, you want to make sure this is done in a way that is compliant with the current EU Cookie Legislation. This states that a cookie cannot be placed without the consent of the visitor. So, by following this guide you'll learn how to ensure that the script runs and cookies are set, only when the visitor accepts cookies.

This contains of three steps;

  1. Decide which category the cookie falls under
  2. Add the custom script
  3. Add the cookie in Settings

1. Decide which category the cookie falls under

There are three categories of cookies; Analytics, Marketing, and Preferences:

Analytics: Cookie collects information about how visitors use the career site.

Marketing: Cookie is used to deliver ads that are more relevant to your visitors’ interests.

Preferences: Cookie allow the career site to remember choices you make, and provide enhanced and more personalized features.

Once you have decided which category our cookie falls under, move on to the next step.

2. Add the custom script

The actual script is provided by the service you want to add, it probably looks something like;

<script>
(function() {
scriptThatWillSetACookie();
})();
</script>

You need to make a small change to make it recognizable as a script that sets cookies. Add data-cookie-type="your-category" to the <script> tag.

The available types are analytics, marketing and preferences.

So, if this script to fall under marketing, the script that you add will end up looking something like this;

<script data-cookie-type="marketing">
(function() {
scriptThatWillSetACookie();
})();
</script>

3. Add the cookie in settings

In Teamtailor, go to Settings -> Cookies and add the cookie under it’s category; analytics, marketing or preferences. You can see a more detailed explanation on how to add a cookie here.

All done! The script will not run, and the cookie will not be set, until the visitor has accepted cookies.

Did this answer your question?