Set Cookie – Expires on Date Action

The Set Cookie – Expires On Date action creates a cookie with a value when the page loads. You can set the cookie to expire on a specific date at a specific time that you determine.

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 implies all subdomains and prefixes, and browsers infer this information. This format matches both and

If you only want this cookie available on a specific subdomain, specify that subdomain as follows: The cookie is only available on URLs with the full subdomain path, and 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 into Cookie Domain. Doing so ensures that no subdomains have access to the cookie and that only URLs with the full path receive this cookie.

If your site supports "naked domains" (for example, doesn't redirect a visitor to, then using any format that starts with www. doesn't work in all cases.

Cookie Expiration Date

Use the calendar and selector to set the date and time for when the cookie expires.

Optional Component

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 but not on