Read, add and remove visitor tags from a backend script — the same tags the Tag User and Has Tag funnel nodes use.
Tags mark a visitor so a later page or funnel step can branch on them: seen_vsl, declined_upsell, vip. Backend scripts get four functions for working with the same tags the Tag User and Has Tag nodes set and read.
if (!hasTag('seen_offer')) { addTag('seen_offer', 10080); // 7 days setVariable('first_visit', true);}
Returns true if the visitor carries the tag, false otherwise. Finds tags set by the Tag User node, by ef.addTag() in the browser, and by addTag() below.
if (hasTag('vip')) { setVariable('discount', 20);}
getTags() lists tags written by addTag() and by ef.addTag() in the browser. Tags written by the Tag User node are stored under a bare cookie name that is indistinguishable from any other cookie, so they cannot be enumerated — hasTag('name') still finds them.
addTag() and removeTag() return false without doing anything when the name is empty, longer than 120 characters, contains characters that are not valid in a cookie name (spaces, ;, =), or collides with a reserved cookie such as hop, subid, aff or the session cookie. This stops a tag from overwriting affiliate or session state.
addTag('hop'); // false — reservedaddTag('my tag'); // false — space is not a valid cookie-name characteraddTag('cart_started'); // true
A tag added by a backend script is visible to the rest of that same script, and to funnel nodes that run after it on the same request:
addTag('qualified');hasTag('qualified'); // true — right away
The Tag User node behaves differently: a tag it sets is only visible to a Has Tag node on the next request, not the one it was set on. If you need set-then-branch inside a single page load, set the tag with addTag() in a backend script rather than with a Tag User node.
Tags are plain, unencrypted cookies. Two naming conventions exist for historical reasons:
Written by
Cookie name
Tag User node (server)
vip
ef.addTag() (browser)
tag_vip
addTag() (backend script)
both vip and tag_vip
addTag() writes both names so a tag set from a backend script is visible everywhere — the Has Tag node, ef.hasTag() in the browser, and the tags array in Script Rules. hasTag() and removeTag() accept either spelling, so you do not have to think about which side set a tag.
Because tags are unencrypted cookies, a visitor can add or remove their own tags from the browser console. Use them for funnel flow and personalization — never as the only gate on paid content, pricing, or anything else where forging a tag would cost you.
50 tag writes per script execution. addTag() and removeTag() return false past that.
Each addTag() and removeTag() emits an add-tag / remove-tag tracking event, the same as the Tag User node and ef.addTag().
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ElasticFunnels.io Documentation","colors":{"primary":"#1d4ed8","light":"#1d4ed8","dark":"#1d4ed8"},"logo":{"light":"https://mintcdn.com/elasticfunnels-8a91cd9d/jzZf0Mv_VgYI1MJ-/logo/light.svg?fit=max\u0026auto=format\u0026n=jzZf0Mv_VgYI1MJ-\u0026q=85\u0026s=5a6223a03b81ea40e3701f2ffba293f7","dark":"https://mintcdn.com/elasticfunnels-8a91cd9d/jzZf0Mv_VgYI1MJ-/logo/light.svg?fit=max\u0026auto=format\u0026n=jzZf0Mv_VgYI1MJ-\u0026q=85\u0026s=5a6223a03b81ea40e3701f2ffba293f7"},"favicon":"https://mintcdn.com/elasticfunnels-8a91cd9d/jzZf0Mv_VgYI1MJ-/favicon.svg?fit=max\u0026auto=format\u0026n=jzZf0Mv_VgYI1MJ-\u0026q=85\u0026s=cf7ba5045160c5a44700b757e946db06","navbar":{"links":[{"href":"mailto:support@elasticfunnels.io","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.elasticfunnels.io"}},"footer":{"socials":{"x":"https://x.com/elasticfunnels","linkedin":"https://linkedin.com/company/elasticfunnels"}},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Email Support","icon":"envelope","href":"mailto:support@elasticfunnels.io"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"elasticfunnels-8a91cd9d","hasAudioNarration":false,"actualSubdomain":"elasticfunnels-8a91cd9d","customDomains":["docs.elasticfunnels.io"],"gitSource":{"type":"github","owner":"elasticfunnels","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adc82808ae49b9c70977b3e","collectionId":"a600496a-3829-4e8c-9b5f-0465c3bf7ea8","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adc82808ae49b9c70977b3e"},"entitlements":{},"buildId":"6adc82808ae49b9c70977b3e","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"Guides","count":218},{"language":"default","tag":"Grow and track","count":84},{"language":"default","tag":"Build","count":54},{"language":"default","tag":"Sell","count":35},{"language":"default","tag":"Developers","count":29},{"language":"default","tag":"Integrations","count":29},{"language":"default","tag":"API Reference","count":26},{"language":"default","tag":"Emails","count":19},{"language":"default","tag":"Pages","count":18},{"language":"default","tag":"Manage","count":15}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"backend-scripts/tags","slug":"/backend-scripts/tags","pageMetadata":{"title":"Tags","icon":"tags","description":"Read, add and remove visitor tags from a backend script — the same tags the Tag User and Has Tag funnel nodes use.","href":"/backend-scripts/tags"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Read, add and remove visitor tags from a backend script — the same tags the Tag User and Has Tag funnel nodes use.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Tags mark a visitor so a later page or funnel step can branch on them: `,_jsx(_components.code,{children:`seen_vsl`}),`, `,_jsx(_components.code,{children:`declined_upsell`}),`, `,_jsx(_components.code,{children:`vip`}),`. Backend scripts get four functions for working with the same tags the `,_jsx(_components.a,{href:`/funnels/page-events-nodes`,children:`Tag User and Has Tag nodes`}),` set and read.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`hasTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'seen_offer'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` addTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'seen_offer'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10080`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 7 days`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setVariable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'first_visit'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`hastag-name`,children:_jsx(_components.code,{children:`hasTag(name)`})}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`true`}),` if the visitor carries the tag, `,_jsx(_components.code,{children:`false`}),` otherwise. Finds tags set by the Tag User node, by `,_jsx(_components.code,{children:`ef.addTag()`}),` in the browser, and by `,_jsx(_components.code,{children:`addTag()`}),` below.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`hasTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'vip'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setVariable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'discount'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`addtag-name-expirationminutes`,children:_jsx(_components.code,{children:`addTag(name, expirationMinutes?)`})}),`\n`,_jsxs(_components.p,{children:[`Adds a tag. Returns `,_jsx(_components.code,{children:`true`}),` if it was added, `,_jsx(_components.code,{children:`false`}),` if the name was rejected or the per-execution cap was hit.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`name`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Tag name. Letters, digits, `,_jsx(_components.code,{children:`_`}),`, `,_jsx(_components.code,{children:`-`}),`, `,_jsx(_components.code,{children:`.`}),`, `,_jsx(_components.code,{children:`:`}),`; max 120 characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`expirationMinutes`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Omit or pass `,_jsx(_components.code,{children:`0`}),` for a session tag; a positive number expires the tag after that many minutes`]})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'abandoned_cart'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// until the browser session ends`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'trial_started'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10080`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 7 days`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'promo_seen'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`60`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 1 hour`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`removetag-name`,children:_jsx(_components.code,{children:`removeTag(name)`})}),`\n`,_jsxs(_components.p,{children:[`Removes a tag. Returns `,_jsx(_components.code,{children:`true`}),` if the removal was queued, `,_jsx(_components.code,{children:`false`}),` if the name was rejected. Removing a tag the visitor does not have is not an error.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`removeTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'abandoned_cart'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`gettags`,children:_jsx(_components.code,{children:`getTags()`})}),`\n`,_jsx(_components.p,{children:`Returns an array of the visitor’s tag names.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setVariable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'tag_count'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getTags`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`length`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`getTags()`}),` lists tags written by `,_jsx(_components.code,{children:`addTag()`}),` and by `,_jsx(_components.code,{children:`ef.addTag()`}),` in the browser. Tags written by the `,_jsx(_components.strong,{children:`Tag User`}),` node are stored under a bare cookie name that is indistinguishable from any other cookie, so they cannot be enumerated — `,_jsx(_components.code,{children:`hasTag('name')`}),` still finds them.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`reserved-and-invalid-names`,children:`Reserved and invalid names`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`addTag()`}),` and `,_jsx(_components.code,{children:`removeTag()`}),` return `,_jsx(_components.code,{children:`false`}),` without doing anything when the name is empty, longer than 120 characters, contains characters that are not valid in a cookie name (spaces, `,_jsx(_components.code,{children:`;`}),`, `,_jsx(_components.code,{children:`=`}),`), or collides with a reserved cookie such as `,_jsx(_components.code,{children:`hop`}),`, `,_jsx(_components.code,{children:`subid`}),`, `,_jsx(_components.code,{children:`aff`}),` or the session cookie. This stops a tag from overwriting affiliate or session state.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'hop'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// false — reserved`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'my tag'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// false — space is not a valid cookie-name character`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cart_started'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// true`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`a-tag-is-visible-immediately`,children:`A tag is visible immediately`}),`\n`,_jsx(_components.p,{children:`A tag added by a backend script is visible to the rest of that same script, and to funnel nodes that run after it on the same request:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'qualified'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`hasTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'qualified'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// true — right away`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Tag User`}),` node behaves differently: a tag it sets is only visible to a `,_jsx(_components.strong,{children:`Has Tag`}),` node on the `,_jsx(_components.em,{children:`next`}),` request, not the one it was set on. If you need set-then-branch inside a single page load, set the tag with `,_jsx(_components.code,{children:`addTag()`}),` in a backend script rather than with a Tag User node.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`how-tags-are-stored`,children:`How tags are stored`}),`\n`,_jsx(_components.p,{children:`Tags are plain, unencrypted cookies. Two naming conventions exist for historical reasons:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Written by`}),_jsx(_components.th,{children:`Cookie name`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Tag User`}),` node (server)`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`vip`})})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ef.addTag()`}),` (browser)`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`tag_vip`})})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`addTag()`}),` (backend script)`]}),_jsxs(_components.td,{children:[`both `,_jsx(_components.code,{children:`vip`}),` and `,_jsx(_components.code,{children:`tag_vip`})]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`addTag()`}),` writes both names so a tag set from a backend script is visible everywhere — the Has Tag node, `,_jsx(_components.code,{children:`ef.hasTag()`}),` in the browser, and the `,_jsx(_components.code,{children:`tags`}),` array in Script Rules. `,_jsx(_components.code,{children:`hasTag()`}),` and `,_jsx(_components.code,{children:`removeTag()`}),` accept either spelling, so you do not have to think about which side set a tag.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Because tags are unencrypted cookies, a visitor can add or remove their own tags from the browser console. Use them for funnel flow and personalization — never as the only gate on paid content, pricing, or anything else where forging a tag would cost you.`})}),`\n`,_jsx(Heading,{level:`2`,id:`example-one-time-offer`,children:`Example: one-time offer`}),`\n`,_jsx(_components.p,{children:`Show an offer once, then never again for 30 days.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` scope`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"backend\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`hasTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'flash_offer_seen'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setVariable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'show_offer'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` addTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'flash_offer_seen'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`43200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 30 days`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setVariable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'show_offer'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`example-clearing-a-tag-after-purchase`,children:`Example: clearing a tag after purchase`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` scope`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"backend\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`is_customer`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` hasTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'abandoned_cart'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` removeTag`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'abandoned_cart'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` queue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`cancel`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'abandon:'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` customer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/backend-scripts/queue`,children:`Queue`}),` for the cancellation tag used here — that is a job-grouping label, unrelated to visitor tags.`]}),`\n`,_jsx(Heading,{level:`2`,id:`limits`,children:`Limits`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`50`}),` tag writes per script execution. `,_jsx(_components.code,{children:`addTag()`}),` and `,_jsx(_components.code,{children:`removeTag()`}),` return `,_jsx(_components.code,{children:`false`}),` past that.`]}),`\n`,_jsxs(_components.li,{children:[`Each `,_jsx(_components.code,{children:`addTag()`}),` and `,_jsx(_components.code,{children:`removeTag()`}),` emits an `,_jsx(_components.code,{children:`add-tag`}),` / `,_jsx(_components.code,{children:`remove-tag`}),` tracking event, the same as the Tag User node and `,_jsx(_components.code,{children:`ef.addTag()`}),`.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Tags","icon":"tags","description":"Read, add and remove visitor tags from a backend script — the same tags the Tag User and Has Tag funnel nodes use.","href":"/backend-scripts/tags"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"hasTag(name)","slug":"hastag-name","depth":2,"children":[]},{"title":"addTag(name, expirationMinutes?)","slug":"addtag-name-expirationminutes","depth":2,"children":[]},{"title":"removeTag(name)","slug":"removetag-name","depth":2,"children":[]},{"title":"getTags()","slug":"gettags","depth":2,"children":[]},{"title":"Reserved and invalid names","slug":"reserved-and-invalid-names","depth":2,"children":[]},{"title":"A tag is visible immediately","slug":"a-tag-is-visible-immediately","depth":2,"children":[]},{"title":"How tags are stored","slug":"how-tags-are-stored","depth":2,"children":[]},{"title":"Example: one-time offer","slug":"example-one-time-offer","depth":2,"children":[]},{"title":"Example: clearing a tag after purchase","slug":"example-clearing-a-tag-after-purchase","depth":2,"children":[]},{"title":"Limits","slug":"limits","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"elasticfunnels-8a91cd9d","siteName":"ElasticFunnels.io Documentation","title":"Tags - ElasticFunnels.io Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-09T07:36:48.000Z","originalFileLocation":"backend-scripts/tags.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Read, add and remove visitor tags from a backend script — the same tags the Tag User and Has Tag funnel nodes use.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ElasticFunnels.io Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Tags - ElasticFunnels.io Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Read, add and remove visitor tags from a backend script — the same tags the Tag User and Has Tag funnel nodes use.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ElasticFunnels.io Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.elasticfunnels.io/backend-scripts/tags\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://elasticfunnels-8a91cd9d.mintlify.app/_mintlify/api/og/v2?division=Reference\u0026amp;title=Tags\u0026amp;description=Read%2C+add+and+remove+visitor+tags+from+a+backend+script+%E2%80%94+the+same+tags+the+Tag+User+and+Has+Tag+funnel+nodes+use.\u0026amp;theme=6b02d9eb1578fbc040e30bc3\u0026amp;signature=82ada9a0b3e1c28e53453169acd4f6b53595d1c2b59b07d9fe88320c43fd5bad\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Tags - ElasticFunnels.io Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Read, add and remove visitor tags from a backend script — the same tags the Tag User and Has Tag funnel nodes use.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://elasticfunnels-8a91cd9d.mintlify.app/_mintlify/api/og/v2?division=Reference\u0026amp;title=Tags\u0026amp;description=Read%2C+add+and+remove+visitor+tags+from+a+backend+script+%E2%80%94+the+same+tags+the+Tag+User+and+Has+Tag+funnel+nodes+use.\u0026amp;theme=6b02d9eb1578fbc040e30bc3\u0026amp;signature=82ada9a0b3e1c28e53453169acd4f6b53595d1c2b59b07d9fe88320c43fd5bad\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/elasticfunnels-8a91cd9d/EikUEODxg9MfyvtR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ElasticFunnels.io Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1d4ed8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.elasticfunnels.io/backend-scripts/tags\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/backend-scripts/tags.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.elasticfunnels.io/#organization\",\"name\":\"ElasticFunnels.io Documentation\",\"url\":\"https://docs.elasticfunnels.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/elasticfunnels-8a91cd9d/jzZf0Mv_VgYI1MJ-/logo/light.svg?fit=max\u0026auto=format\u0026n=jzZf0Mv_VgYI1MJ-\u0026q=85\u0026s=5a6223a03b81ea40e3701f2ffba293f7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.elasticfunnels.io#website\",\"name\":\"ElasticFunnels.io Documentation\",\"url\":\"https://docs.elasticfunnels.io\",\"publisher\":{\"@id\":\"https://docs.elasticfunnels.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.elasticfunnels.io/backend-scripts/tags#webpage\",\"url\":\"https://docs.elasticfunnels.io/backend-scripts/tags\",\"name\":\"Tags\",\"description\":\"Read, add and remove visitor tags from a backend script — the same tags the Tag User and Has Tag funnel nodes use.\",\"dateModified\":\"2026-09-09T07:36:48.000Z\",\"isPartOf\":{\"@id\":\"https://docs.elasticfunnels.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.elasticfunnels.io/backend-scripts/tags#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.elasticfunnels.io/backend-scripts/tags#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Developers\",\"item\":\"https://docs.elasticfunnels.io/debugging/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Backend scripts\",\"item\":\"https://docs.elasticfunnels.io/backend-scripts/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Reference\",\"item\":\"https://docs.elasticfunnels.io/backend-scripts/context\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Tags\",\"item\":\"https://docs.elasticfunnels.io/backend-scripts/tags\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.elasticfunnels.io/backend-scripts/tags#article\",\"headline\":\"Tags\",\"name\":\"Tags\",\"description\":\"Read, add and remove visitor tags from a backend script — the same tags the Tag User and Has Tag funnel nodes use.\",\"url\":\"https://docs.elasticfunnels.io/backend-scripts/tags\",\"mainEntityOfPage\":{\"@id\":\"https://docs.elasticfunnels.io/backend-scripts/tags#webpage\"},\"dateModified\":\"2026-09-09T07:36:48.000Z\",\"publisher\":{\"@id\":\"https://docs.elasticfunnels.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.elasticfunnels.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ElasticFunnels.io Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"ElasticFunnels.io Documentation","nav":{"global":{"anchors":[{"anchor":"Email Support","icon":"envelope","href":"mailto:support@elasticfunnels.io"}]},"tabs":[{"tab":"Guides","groups":[{"group":"Get started","icon":"rocket","pages":[{"title":"Introduction","icon":"house","href":""}]},{"group":"Build","icon":"hammer","pages":[{"group":"Template kits","icon":"swatchbook","pages":[{"title":"Template kits","sidebarTitle":"Overview","icon":"book-open","href":"/template-kits/overview"},{"title":"Apply a kit","icon":"wand-magic-sparkles","href":"/template-kits/apply-a-kit"},{"title":"After applying a kit","sidebarTitle":"After applying","icon":"list-check","href":"/template-kits/after-applying"},{"title":"Kit images","icon":"image","href":"/template-kits/kit-images"},{"title":"Customise a kit with AI","sidebarTitle":"AI customising","icon":"sparkles","href":"/template-kits/ai-customise"},{"title":"Template kit troubleshooting","sidebarTitle":"Troubleshooting","icon":"wrench","href":"/template-kits/troubleshooting"},{"title":"Template kit glossary","sidebarTitle":"Glossary","icon":"book","href":"/template-kits/glossary"}]},{"group":"Pages","icon":"file-lines","pages":[{"title":"Pages Overview","sidebarTitle":"Overview","icon":"book-open","href":"/pages/overview"},{"title":"Create Landing Page","sidebarTitle":"Create a landing page","icon":"file-circle-plus","href":"/pages/create-landing-page"},{"title":"Page Settings","sidebarTitle":"Page settings","icon":"sliders","href":"/pages/page-settings"},{"title":"Wildcard routes","icon":"asterisk","href":"/pages/wildcard-routes"},{"title":"SEO: sitemap.xml, robots.txt and llms.txt","sidebarTitle":"SEO and llms.txt","icon":"magnifying-glass","href":"/pages/seo"},{"title":"Privacy \u0026 consent","icon":"cookie-bite","href":"/pages/privacy-consent"},{"title":"Rendering pipeline","icon":"gears","href":"/pages/rendering-pipeline"},{"group":"Variants and revisions","icon":"code-branch","pages":[{"title":"Page Variants","sidebarTitle":"Page variants","icon":"clone","href":"/pages/page-variants"},{"title":"Page Revisions","sidebarTitle":"Page revisions","icon":"clock-rotate-left","href":"/pages/page-revisions"},{"title":"Content Visibility Control","sidebarTitle":"Content visibility","icon":"eye","href":"/pages/visitor-based-content"}]},{"group":"Page elements","icon":"shapes","pages":[{"title":"Interactions Panel","sidebarTitle":"Interactions panel","icon":"hand-pointer","href":"/pages/interactions-panel"},{"title":"Containers","icon":"box-open","href":"/pages/containers"},{"title":"Page Variables \u0026 Placeholders","sidebarTitle":"Variables and placeholders","icon":"brackets-curly","href":"/pages/page-variables"},{"title":"Internationalization (i18n)","sidebarTitle":"Translations (i18n)","icon":"language","href":"/pages/internationalization"}]},{"group":"Store tags","icon":"tags","pages":[{"title":"Order Tag","sidebarTitle":"Order tag","icon":"receipt","href":"/pages/order-tag"},{"title":"Product Item Tag","sidebarTitle":"Product item tag","icon":"tag","href":"/pages/product-item-tag"},{"title":"Collection Item Tag","sidebarTitle":"Collection item tag","icon":"layer-group","href":"/pages/collection-item-tag"},{"title":"Cart","icon":"cart-shopping","href":"/pages/cart"}]}]},{"group":"Funnels","icon":"filter","pages":[{"title":"Create a Funnel","sidebarTitle":"Create a funnel","icon":"circle-plus","href":"/funnels/create-funnel"},{"title":"Trigger Pages","sidebarTitle":"Trigger pages","icon":"file-import","href":"/funnels/trigger-pages"},{"title":"Trigger Rules","sidebarTitle":"Trigger rules","icon":"code-fork","href":"/funnels/trigger-rules"},{"title":"Checkout Redirect Behavior","sidebarTitle":"Checkout redirects","icon":"arrow-right-arrow-left","href":"/funnels/checkout-redirect-behavior"}]},{"group":"Page events","icon":"diagram-project","pages":[{"title":"Page Events","sidebarTitle":"Overview","icon":"book-open","href":"/funnels/page-events"},{"title":"Page Events Node Reference","sidebarTitle":"Node reference","icon":"circle-nodes","href":"/funnels/page-events-nodes"},{"group":"Event types","icon":"bolt","pages":[{"title":"Script Rule","sidebarTitle":"Script rule","icon":"scroll","href":"/funnels/script-rule"},{"title":"EF API (window.ef)","icon":"code","href":"/funnels/window-api"},{"title":"Dynamic Content","sidebarTitle":"Dynamic content","icon":"shuffle","href":"/funnels/dynamic-content"},{"title":"Exit Popups","sidebarTitle":"Exit popups","icon":"door-open","href":"/funnels/exit-popups"},{"title":"Popups and interactions from code","sidebarTitle":"Popups from code","icon":"window-restore","href":"/funnels/popups-from-code"}]},{"group":"Routing","icon":"route","pages":[{"title":"Query Parameter Conditions","sidebarTitle":"Query parameters","icon":"link","href":"/funnels/query-parameters"},{"title":"Sequence Nodes","sidebarTitle":"Sequence nodes","icon":"list-ol","href":"/funnels/sequence-nodes"}]}]},{"group":"Quizzes","icon":"circle-question","pages":[{"title":"Build and Publish a Quiz","sidebarTitle":"Build and publish","icon":"hammer","href":"/quizzes/build-and-publish"},{"title":"Quiz Blocks and Answers","sidebarTitle":"Blocks and answers","icon":"cubes","href":"/quizzes/blocks-and-answers"},{"title":"Design a Quiz Page Intro","sidebarTitle":"Page intro","icon":"window-maximize","href":"/quizzes/page-intro"}]},{"group":"Forms","icon":"clipboard-list","pages":[{"title":"Lead Capture Forms","sidebarTitle":"Lead capture forms","icon":"user-plus","href":"/forms/lead-capture"},{"title":"Add a form to a page with code","sidebarTitle":"Forms in code","icon":"code","href":"/forms/forms-in-code"},{"title":"Thank You Pages","sidebarTitle":"Thank you pages","icon":"heart","href":"/forms/thank-you-pages"},{"title":"Export Collection Data","sidebarTitle":"Export form data","icon":"file-export","href":"/forms/export-data"}]},{"group":"Members area","icon":"id-card","pages":[{"title":"Members Area","sidebarTitle":"Overview","icon":"book-open","href":"/members-area/overview"},{"title":"Members Login","sidebarTitle":"Members login","icon":"right-to-bracket","href":"/members-area/login"},{"title":"Showing Order Details","sidebarTitle":"Order details","icon":"receipt","href":"/members-area/order-details"},{"title":"Subscription Management Page","sidebarTitle":"Manage subscriptions","icon":"arrows-rotate","href":"/members-area/subscription-management"},{"title":"Customer Care Portal","sidebarTitle":"Customer care portal","icon":"headset","href":"/members-area/customer-care"}]},{"group":"Courses","icon":"graduation-cap","pages":[{"title":"Courses","sidebarTitle":"Overview","icon":"book-open","href":"/courses/overview"},{"title":"Course pages","icon":"chalkboard-user","href":"/courses/student-pages"},{"title":"Courses on your own pages","sidebarTitle":"Courses on your pages","icon":"file-code","href":"/courses/own-pages"},{"title":"Courses — Template Reference","sidebarTitle":"Template reference","icon":"code","href":"/courses/template"}]}]},{"group":"Sell","icon":"cart-shopping","pages":[{"group":"Products","icon":"box","pages":[{"title":"Product Management","sidebarTitle":"Manage products","icon":"boxes-stacked","href":"/products/product-management"},{"title":"Product Folders","sidebarTitle":"Product folders","icon":"folder","href":"/products/product-folders"},{"title":"Product Variants","sidebarTitle":"Variants","icon":"palette","href":"/products/variants"},{"title":"Product Attributes","sidebarTitle":"Attributes","icon":"list","href":"/products/product-attributes"},{"title":"Custom Product Attributes (Legacy)","sidebarTitle":"Custom attributes (legacy)","icon":"box-archive","href":"/products/custom-attributes"},{"title":"Buy Links","sidebarTitle":"Buy links","icon":"link","href":"/products/buy-links"},{"title":"Advanced Purchase Links","sidebarTitle":"Advanced purchase links","icon":"square-share-nodes","href":"/products/advanced-purchase-links"}]},{"group":"Checkouts","icon":"credit-card","pages":[{"title":"How to design a checkout page","sidebarTitle":"Design a checkout page","icon":"pen-ruler","href":"/guides/how-to-design-a-checkout-page"},{"title":"Checkout functionality reference","sidebarTitle":"Checkout reference","icon":"book","href":"/checkouts/checkout-functionality-reference"},{"title":"Package selector","icon":"table-cells-large","href":"/checkouts/package-selector"}]},{"group":"Upsells","icon":"arrow-trend-up","pages":[{"title":"Upsells","icon":"arrow-up-right-dots","href":"/products/upsells"},{"title":"Subscription Upsells","sidebarTitle":"Subscription upsells","icon":"arrows-rotate","href":"/products/subscription-upsells"},{"title":"Upsell Forms (Gift Address and Custom Fields)","href":"/products/upsell-forms"}]},{"group":"Merchants","icon":"building-columns","pages":[{"title":"How to set up a new merchant","sidebarTitle":"Set up a merchant","icon":"circle-plus","href":"/guides/how-to-set-up-a-new-merchant"},{"title":"High-Risk Merchants and Merchant Accounts","sidebarTitle":"High-risk merchant accounts","icon":"triangle-exclamation","href":"/merchants/high-risk-and-merchant-accounts"},{"title":"Postback URLs","icon":"arrow-right-arrow-left","href":"/merchants/postback-urls"},{"title":"Test merchant (sandbox)","sidebarTitle":"Test merchant","icon":"vial","href":"/merchants/test-merchant"},{"group":"Merchant platforms","icon":"store","pages":[{"title":"ClickBank","icon":"store","href":"/merchants/clickbank"},{"title":"BuyGoods","sidebarTitle":"BuyGoods","icon":"store","href":"/merchants/buygoods"},{"title":"Digistore24","icon":"store","href":"/merchants/digistore24"},{"title":"JVZoo","icon":"store","href":"/merchants/jvzoo"},{"title":"Explodely","icon":"store","href":"/merchants/explodely"},{"title":"Shopify Checkout","icon":"shopify","href":"/merchants/shopify-checkout"}]},{"group":"Express checkout","icon":"bolt","pages":[{"title":"Shop Pay","icon":"shopify","href":"/merchants/shop-pay"},{"title":"PayPal","icon":"paypal","href":"/merchants/paypal"},{"title":"Apple Pay and Google Pay","icon":"wallet","href":"/merchants/apple-pay-google-pay"}]}]},{"group":"Subscriptions","icon":"arrows-rotate","pages":[{"title":"Subscriptions Overview","sidebarTitle":"Overview","icon":"book-open","href":"/subscriptions/overview"},{"title":"Subscription Emails \u0026 Dunning","sidebarTitle":"Emails and dunning","icon":"envelope","href":"/subscriptions/emails-and-dunning"},{"title":"Subscription Analytics","sidebarTitle":"Subscription analytics","icon":"chart-line","href":"/subscriptions/analytics"},{"title":"Retention Offers","sidebarTitle":"Retention offers","icon":"hand-holding-heart","href":"/subscriptions/retention-offers"}]},{"group":"Orders and fulfillment","icon":"truck","pages":[{"title":"Fulfillment Integration","sidebarTitle":"Fulfillment","icon":"truck-fast","href":"/integrations/fulfillment"},{"title":"Shopify Order Sync","sidebarTitle":"Shopify order sync","icon":"shopify","href":"/integrations/shopify-order-sync"},{"title":"Sales Tax Integrations","sidebarTitle":"Sales tax","icon":"percent","href":"/integrations/tax"},{"title":"External Call Center Integrations","sidebarTitle":"Call centers","icon":"headset","href":"/integrations/callcenters"},{"title":"Chargeback Management","sidebarTitle":"Chargeback management","icon":"shield-halved","href":"/integrations/chargeback-management"}]}]},{"group":"Grow and track","icon":"chart-line","pages":[{"group":"Analytics","icon":"chart-pie","pages":[{"title":"Custom dashboards and presets","sidebarTitle":"Dashboards and presets","icon":"table-columns","href":"/analytics/custom-dashboards"},{"title":"Conversion Metrics","sidebarTitle":"Conversion metrics","icon":"money-bill-trend-up","href":"/analytics/conversions"},{"title":"Ad Spend Metrics","sidebarTitle":"Ad spend metrics","icon":"sack-dollar","href":"/analytics/ad-spend-metrics"},{"title":"Tracking Metrics","sidebarTitle":"Tracking metrics","icon":"location-crosshairs","href":"/analytics/tracking-metrics"},{"title":"Video Metrics","sidebarTitle":"Video metrics","icon":"circle-play","href":"/analytics/video-metrics"}]},{"group":"Split testing","icon":"flask","pages":[{"title":"Funnel Split Testing","sidebarTitle":"Funnel split tests","icon":"filter","href":"/funnels/funnel-split-testing"},{"title":"Split Testing","sidebarTitle":"Split test node","icon":"code-branch","href":"/funnels/split-testing"},{"title":"Split Test Analytics","sidebarTitle":"Split test results","icon":"chart-simple","href":"/analytics/split-test"},{"title":"Automation Split Tests","href":"/analytics/automation-split-tests"},{"title":"A/B Testing a Campaign","sidebarTitle":"Campaign A/B tests","icon":"envelope-open-text","href":"/campaigns/ab-testing"}]},{"group":"Campaigns","icon":"bullhorn","pages":[{"title":"Email Campaigns","sidebarTitle":"Email campaigns","icon":"envelope","href":"/campaigns/email-campaigns"},{"title":"SMS Campaigns","sidebarTitle":"SMS campaigns","icon":"comment-sms","href":"/campaigns/sms-campaigns"}]},{"group":"Contacts","icon":"address-book","pages":[{"title":"Contacts","href":"/contacts/overview"},{"title":"Merging and duplicates","href":"/contacts/merge-and-duplicates"},{"title":"Importing Contacts","sidebarTitle":"Import contacts","icon":"file-import","href":"/contacts/import"}]},{"group":"Audiences","icon":"users","pages":[{"title":"Audience Actions","sidebarTitle":"Audience actions","icon":"user-check","href":"/analytics/audience-actions"},{"title":"Audiences: identity match rules","href":"/analytics/audience-identity-matches"}]},{"group":"Affiliates","icon":"handshake","pages":[{"title":"Internal affiliates and the affiliate portal","sidebarTitle":"Internal affiliates","icon":"handshake","href":"/affiliates/internal-affiliates"},{"title":"Affiliate Postback URLs","sidebarTitle":"Affiliate postback URLs","icon":"arrow-right-arrow-left","href":"/affiliates/postback-urls"},{"group":"Affiliate portal","icon":"door-open","pages":[{"title":"Affiliate portal","sidebarTitle":"Overview","icon":"door-open","href":"/affiliate-portal/overview"},{"title":"Set up the affiliate portal","sidebarTitle":"Set up the portal","icon":"globe","href":"/affiliate-portal/set-up"},{"title":"Brands on the portal","sidebarTitle":"Brands","icon":"layer-group","href":"/affiliate-portal/brands"},{"title":"Manage portal affiliates","sidebarTitle":"Affiliates","icon":"users","href":"/affiliate-portal/affiliates"},{"title":"Commissions and payouts","sidebarTitle":"Commissions and payouts","icon":"money-check-dollar","href":"/affiliate-portal/payouts"},{"title":"Assets for affiliates","sidebarTitle":"Assets","icon":"photo-film","href":"/affiliate-portal/assets"},{"title":"Brand the portal and its emails","sidebarTitle":"Branding and emails","icon":"palette","href":"/affiliate-portal/branding"},{"title":"Who can manage the affiliate portal","sidebarTitle":"Permissions","icon":"user-shield","href":"/affiliate-portal/permissions"},{"group":"What affiliates see","icon":"eye","pages":[{"title":"Sign-up and sign-in on the portal","sidebarTitle":"Sign-up and sign-in","icon":"right-to-bracket","href":"/affiliate-portal/affiliate-sign-up"},{"title":"Dashboard and reports on the portal","sidebarTitle":"Dashboard and reports","icon":"chart-line","href":"/affiliate-portal/affiliate-dashboard"},{"title":"Tracking links and resources on the portal","sidebarTitle":"Links and resources","icon":"link","href":"/affiliate-portal/affiliate-links"},{"title":"Payouts and payout details on the portal","sidebarTitle":"Payouts","icon":"wallet","href":"/affiliate-portal/affiliate-payouts"},{"title":"Affiliates' own pixels and postbacks","sidebarTitle":"Tracking and postbacks","icon":"satellite-dish","href":"/affiliate-portal/affiliate-tracking"}]}]}]},{"group":"Emails","icon":"envelope","pages":[{"title":"Emails","sidebarTitle":"Overview","icon":"book-open","href":"/emails/overview"},{"title":"Building an email","sidebarTitle":"Build an email","icon":"pen-to-square","href":"/emails/builder"},{"title":"Template Variables","sidebarTitle":"Template variables","icon":"brackets-curly","href":"/emails/template-variables"},{"group":"Sending","icon":"paper-plane","pages":[{"title":"Sending Setup","sidebarTitle":"Sending setup","icon":"gear","href":"/emails/sending-setup"},{"title":"Email Sending Accounts","sidebarTitle":"Sending accounts","icon":"at","href":"/emails/sending-accounts"},{"title":"Delivery Events","sidebarTitle":"Delivery events","icon":"inbox","href":"/emails/delivery-events"},{"title":"Emails Not Sending","sidebarTitle":"Emails not sending","icon":"triangle-exclamation","href":"/emails/troubleshooting"},{"group":"Provider keys","pages":[{"title":"Where to find your Mailgun API key and webhook signing key","sidebarTitle":"Mailgun","href":"/emails/provider-keys/mailgun"},{"title":"Where to find your SendGrid API key and verification key","sidebarTitle":"SendGrid","href":"/emails/provider-keys/sendgrid"},{"title":"Where to find your Amazon SES access key","sidebarTitle":"Amazon SES","href":"/emails/provider-keys/amazon-ses"},{"title":"Where to find your Postmark server API token","sidebarTitle":"Postmark","href":"/emails/provider-keys/postmark"},{"title":"Where to find your Brevo API key","sidebarTitle":"Brevo","href":"/emails/provider-keys/brevo"},{"title":"Where to find your Resend API key and webhook signing secret","sidebarTitle":"Resend","href":"/emails/provider-keys/resend"},{"title":"Where to find your Mailrelay SMTP settings","sidebarTitle":"Mailrelay","href":"/emails/provider-keys/mailrelay"}]}]},{"group":"Automatic emails","icon":"envelopes-bulk","pages":[{"title":"Order Emails","sidebarTitle":"Order emails","icon":"receipt","href":"/emails/order-emails"},{"title":"Subscription Emails","sidebarTitle":"Subscription emails","icon":"arrows-rotate","href":"/emails/subscription-emails"},{"title":"Dunning","icon":"credit-card","href":"/emails/dunning"},{"title":"Course Emails","sidebarTitle":"Course emails","icon":"graduation-cap","href":"/emails/course-emails"},{"title":"Login Emails","sidebarTitle":"Login emails","icon":"key","href":"/emails/login-emails"}]}]},{"group":"Automations","icon":"robot","pages":[{"title":"Use data from earlier steps","sidebarTitle":"Data from earlier steps","icon":"brackets-curly","href":"/automations/variables"},{"title":"Send Email Step","sidebarTitle":"Send email step","icon":"paper-plane","href":"/automations/send-email"},{"title":"Send SMS Step","sidebarTitle":"Send SMS step","icon":"comment-sms","href":"/automations/send-sms"},{"title":"Automation Run History","sidebarTitle":"Run history","icon":"clock-rotate-left","href":"/automations/run-history"}]},{"group":"Integrations","icon":"plug","pages":[{"title":"Connect and remove integrations","sidebarTitle":"Connect integrations","icon":"plug-circle-plus","href":"/integrations/connect"},{"title":"Integration activity, errors and presets","sidebarTitle":"Activity and errors","icon":"heart-pulse","href":"/integrations/integration-health"},{"group":"Ad platforms","icon":"bullhorn","pages":[{"title":"Meta Ads Integration","sidebarTitle":"Meta Ads","icon":"meta","href":"/integrations/meta-ads"},{"title":"Campaigns Management","sidebarTitle":"Campaigns management","icon":"sliders","href":"/integrations/campaigns-management"},{"title":"Google Ads Integration","sidebarTitle":"Google Ads","icon":"google","href":"/integrations/google-ads"},{"title":"Taboola Integration","sidebarTitle":"Taboola","icon":"rectangle-ad","href":"/integrations/taboola"}]},{"group":"Affiliate networks and attribution","icon":"share-nodes","pages":[{"title":"Affiliate Tracking","sidebarTitle":"Affiliate tracking","icon":"handshake","href":"/integrations/affiliate-tracking"},{"title":"Buygoods Integration","sidebarTitle":"BuyGoods","icon":"store","href":"/integrations/buygoods"},{"title":"Clickbank Integration","sidebarTitle":"ClickBank","icon":"store","href":"/integrations/clickbank"},{"title":"JVZoo Integration","sidebarTitle":"JVZoo","icon":"store","href":"/integrations/jvzoo"},{"title":"Everflow Integration","sidebarTitle":"Everflow","icon":"diagram-successor","href":"/integrations/everflow"},{"title":"RedTrack Integration","sidebarTitle":"RedTrack","icon":"location-crosshairs","href":"/integrations/redtrack"}]},{"group":"Email and CRM","icon":"address-book","pages":[{"title":"Email Marketing \u0026 Validation Integrations","sidebarTitle":"Email marketing","icon":"envelope-open-text","href":"/integrations/email-marketing"},{"title":"Maropost Integration","sidebarTitle":"Maropost","icon":"envelope","href":"/integrations/maropost"},{"title":"External CRM Integrations","sidebarTitle":"External CRMs","icon":"address-card","href":"/integrations/crm"}]},{"group":"AI and messaging","icon":"comments","pages":[{"title":"AI Providers (BYO key)","sidebarTitle":"AI providers","icon":"wand-magic-sparkles","href":"/integrations/ai-providers"},{"title":"Twilio Integration","sidebarTitle":"Twilio","icon":"comment-sms","href":"/integrations/twilio"},{"title":"Plivo Integration","sidebarTitle":"Plivo","icon":"comment-sms","href":"/integrations/plivo"},{"title":"Telnyx Integration","sidebarTitle":"Telnyx","icon":"comment-sms","href":"/integrations/telnyx"},{"title":"SMS Compliance","sidebarTitle":"SMS compliance","icon":"shield-check","href":"/settings/sms"},{"group":"SMS provider keys","pages":[{"title":"Where to find your Twilio Account SID and API key","sidebarTitle":"Twilio","href":"/emails/provider-keys/twilio"},{"title":"Where to find your Plivo Auth ID and Auth Token","sidebarTitle":"Plivo","href":"/emails/provider-keys/plivo"},{"title":"Where to find your Telnyx API key and public key","sidebarTitle":"Telnyx","href":"/emails/provider-keys/telnyx"},{"title":"Where to find your SlickText API key","sidebarTitle":"SlickText","href":"/emails/provider-keys/slicktext"}]},{"title":"SlickText Integration","sidebarTitle":"SlickText","icon":"message","href":"/integrations/slicktext"},{"title":"Attentive Integration","sidebarTitle":"Attentive","icon":"message","href":"/integrations/attentive"}]},{"group":"Data and video","icon":"database","pages":[{"title":"Google Analytics Integration","sidebarTitle":"Google Analytics","icon":"chart-line","href":"/integrations/google-analytics"},{"title":"Google Sheets Integration","sidebarTitle":"Google Sheets","icon":"table","href":"/integrations/google-sheets"},{"title":"TrackPlay Video Player","sidebarTitle":"TrackPlay","icon":"circle-play","href":"/integrations/trackplay"}]}]}]},{"group":"Manage","icon":"gear","pages":[{"title":"Brand Actions \u0026 Alerts","sidebarTitle":"Brand actions and alerts","icon":"bell","href":"/essentials/brand-actions"},{"title":"Alerts","sidebarTitle":"Alerts","icon":"triangle-exclamation","href":"/essentials/alerts"},{"group":"Account and security","icon":"shield-halved","pages":[{"title":"Two-factor authentication","icon":"mobile-screen","href":"/account/two-factor-authentication"},{"title":"Passkeys","icon":"fingerprint","href":"/account/passkeys"},{"title":"Connect the ef CLI and create API keys","sidebarTitle":"CLI and API keys","icon":"key","href":"/account/cli-and-api-keys"},{"title":"Audiences and campaigns from the ef CLI","sidebarTitle":"CLI: audiences and campaigns","icon":"terminal","href":"/account/cli-audiences-and-campaigns"},{"title":"Refer \u0026 Earn","icon":"gift","href":"/account/refer-and-earn"},{"title":"AI credits","icon":"sparkles","href":"/account/ai-credits"}]},{"group":"Team and permissions","icon":"user-shield","pages":[{"title":"Roles, permissions, and metrics","sidebarTitle":"Roles and permissions","icon":"user-gear","href":"/essentials/roles-permissions-metrics"},{"title":"Permission matrix","icon":"table-cells","href":"/essentials/permission-matrix"},{"title":"Restricted role troubleshooting","icon":"wrench","href":"/essentials/restricted-role-troubleshooting"}]},{"group":"Domains","icon":"globe","pages":[{"title":"Custom Domains \u0026 SSL","sidebarTitle":"Custom domains and SSL","icon":"globe","href":"/domains/custom-domains"},{"title":"Page Customization","sidebarTitle":"Fonts and colors","icon":"paintbrush","href":"/domains/customization"},{"title":"Domain-Level Whitelisting","sidebarTitle":"Domain whitelisting","icon":"list-check","href":"/domains/whitelisting"},{"title":"reCAPTCHA Setup","sidebarTitle":"reCAPTCHA","icon":"robot","href":"/domains/recaptcha-setup"}]}]},{"group":"Developers","icon":"code","pages":[{"group":"Debugging","icon":"bug","pages":[{"title":"Development \u0026 Debugging","sidebarTitle":"Overview","icon":"code","href":"/debugging/overview"},{"title":"Debug Window","sidebarTitle":"Debug window","icon":"bug","href":"/debugging/debug-window"}]},{"group":"Frontend template engine","icon":"brackets-curly","pages":[{"title":"Overview","icon":"book-open","href":"/frontend-template-engine/overview"},{"title":"Syntax","icon":"code","href":"/frontend-template-engine/syntax"},{"group":"Data and bindings","icon":"database","pages":[{"title":"Scope \u0026 Data","icon":"sitemap","href":"/frontend-template-engine/scope-and-data"},{"title":"Bindings \u0026 Events","icon":"link","href":"/frontend-template-engine/bindings-forms-events"},{"title":"Functions","icon":"function","href":"/frontend-template-engine/built-in-functions"}]},{"group":"Store","icon":"cart-shopping","pages":[{"title":"Cart","icon":"cart-shopping","href":"/frontend-template-engine/cart"},{"title":"Checkout","icon":"credit-card","href":"/frontend-template-engine/checkout"}]},{"group":"Advanced","icon":"screwdriver-wrench","pages":[{"title":"Limitations","icon":"triangle-exclamation","href":"/frontend-template-engine/limitations-pitfalls"},{"title":"Debugging","icon":"bug","href":"/frontend-template-engine/debugging"}]}]},{"group":"Backend template engine","icon":"server","pages":[{"title":"Overview","icon":"book-open","href":"/backend-template-engine/overview"},{"title":"Directives","icon":"code","href":"/backend-template-engine/directives"},{"title":"Variables and filters","icon":"filter","href":"/backend-template-engine/variables-and-filters"},{"title":"Products, categories \u0026 shipping (backend)","sidebarTitle":"Products and shipping","icon":"truck","href":"/backend-template-engine/products-and-shipping"}]},{"group":"Backend scripts","icon":"terminal","pages":[{"title":"Backend Scripts","sidebarTitle":"Overview","icon":"book-open","href":"/backend-scripts/overview"},{"title":"Imports","icon":"file-import","href":"/backend-scripts/imports"},{"group":"Reference","icon":"book","pages":[{"title":"Request Context","sidebarTitle":"Request context","icon":"globe","href":"/backend-scripts/context"},{"title":"Actions","icon":"bolt","description":"Side-effect functions: session, cookies, redirects, response control, headers, and template variables.","href":"/backend-scripts/actions"},{"title":"Tags","icon":"tags","href":"/backend-scripts/tags"},{"title":"Data Functions","sidebarTitle":"Data functions","icon":"database","description":"Query customers, orders, products, courses, blog, and more from your backend scripts.","href":"/backend-scripts/data-functions"},{"title":"Schema Validator","sidebarTitle":"Schema validator","icon":"check-double","href":"/backend-scripts/validation"},{"title":"HTTP Requests","sidebarTitle":"HTTP requests","icon":"cloud-arrow-up","href":"/backend-scripts/http"},{"title":"Cache","icon":"bolt-lightning","href":"/backend-scripts/cache"},{"title":"Queue","icon":"list-ol","href":"/backend-scripts/queue"},{"title":"Storage","icon":"hard-drive","href":"/backend-scripts/storage"}]},{"title":"Examples","icon":"lightbulb","href":"/backend-scripts/examples"}]},{"group":"Custom CRM data","icon":"address-book","pages":[{"title":"CRM Overview","sidebarTitle":"CRM overview","icon":"book-open","href":"/crm/overview"},{"title":"Building Custom Workflows","sidebarTitle":"Custom workflows","icon":"diagram-next","href":"/crm/post-workflow"}]}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"title":"Tags - ElasticFunnels.io Documentation","buildId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","deploymentId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","dynamics":[],"chunks":[]}