Set Cookie – Expires in Minutes Action

The Set Cookie – Expires in Minutes action drops a cookie with a value when the page loads. You can set the cookie to expire after an amount of time in minutes that you define.

Required Components

Cookie Name

Monetate uses whatever text you type into Cookie Name as the name of the cookie. Use only the letters A through Z and the numerals 0 through 9 in this field. Do not use spaces or special characters.

Cookie Value

Monetate uses whatever text you type into Cookie Value as the value of the cookie the action sets. Do not use a semicolon (;) in the field.

Overwrite Existing Cookie

The Overwrite Existing Cookie? setting determines if the cookie that the action sets ignores or overwrites any existing cookie if the existing one matches the Cookie Name input.

If you select YES, then Monetate overwrites the the existing cookie's value and expiration. If you select NO, then Monetate doesn't create a cookie and doesn't reset the existing cookie's value and expiration.

Cookie Domain

Even though Cookie Domain appears in the Optional Inputs section of the action template, you must input the cookie domain.

The cookie domain is an important security feature that ensures the browser only sends the cookie to matching domains.

In most modern browsers, the format website.com implies all subdomains and prefixes, and browsers infer this information. This format matches both www.website.com and stage.website.com.

If you only want this cookie available on a specific subdomain, specify that subdomain as follows: stage.website.com. The cookie is only available on URLs with the full subdomain path, and www.website.com doesn't contain this cookie.

Alternatively, if you only want the cookie available on your production site and that site domain begins with www., then enter www.website.com into Cookie Domain. Doing so ensures that no subdomains have access to the cookie and that only URLs with the full path www.website.com receive this cookie.

If your site supports "naked domains" (for example, http://website.com doesn't redirect a customer to http://www.website.com), then using any format that starts with www. doesn't work in all cases.

Optional Components

Time Until Expiration

If you want the cookie to expire after a specific number of minutes pass, then enter that amount here. If you leave this setting blank, then the cookie that the action sets is a session-level cookie that is erased when the customer closes their browser.

Cookie Path

Use Cookie Path to limit the cookie to specific URL paths or subdirectories. For example, if you input /test into Cookie Path, then the cookie is only accessible on yoursite.com/test/example but not on yoursite.com/pages/example.