Skip to content

Help Center

Set Cookie Expiry Time

When a visitor arrives on your site, Attributer looks at where they came from and stores a whole heap of data in a cookie in the visitor’s browser (including the channel they came from, the UTM parameters they arrived with, etc). We then write this data into the hidden fields when someone submits a form and it is captured by your form tool.

By default, Attributer sets the cookie expiry to 365 days. This essentially means that the cookie that gets set by Attributer on the lead’s first visit will persist for 365 days and so no matter how many times a user comes back and completes a form in that time, Attributer will always remember the information from their first visit.

However if you wish to, you can change the cookie expiry period and the below article will show you how.

Step 1: Copy and edit the below code

The code below is a little bit of ‘modifier code’ that tells Attributer to change the cookie expiry period to whatever you set.

<script>
    window.attributersettings = {
        cookieLife: 3
      }
</script>

Copy the above code and change the number ‘3’ to however many days you want to set the cookie expiry for.

Step 2: Paste the code above the Attributer code on your website

Now that you have modified the code to set your preferred expiry time, you need to paste it ABOVE the Attributer code.

So it needs to look a bit like this:

Can't find the answer you need? Contact us!

Our team are available to answer any questions you have

Support Images