{
    "exportFormatVersion": 2,
    "exportTime": "2026-09-22 11:45:50",
    "containerVersion": {
        "path": "accounts/6218296892/containers/264750429/versions/0",
        "accountId": "6218296892",
        "containerId": "264750429",
        "containerVersionId": "0",
        "container": {
            "path": "accounts/6218296892/containers/264750429",
            "accountId": "6218296892",
            "containerId": "264750429",
            "name": "WooCommerce Testshop",
            "publicId": "GTM-W26GKGKM",
            "usageContext": [
                "WEB"
            ],
            "fingerprint": "1789987201684",
            "tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/6218296892/containers/264750429/workspaces?apiLink=container",
            "features": {
                "supportUserPermissions": true,
                "supportEnvironments": true,
                "supportWorkspaces": true,
                "supportGtagConfigs": false,
                "supportBuiltInVariables": true,
                "supportClients": false,
                "supportFolders": true,
                "supportTags": true,
                "supportTemplates": true,
                "supportTriggers": true,
                "supportVariables": true,
                "supportVersions": true,
                "supportZones": true,
                "supportTransformations": false
            },
            "tagIds": [
                "GTM-W26GKGKM"
            ]
        },
        "tag": [
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "tagId": "10",
                "name": "OpenAI - Purchase",
                "type": "cvt_264750429_8",
                "parameter": [
                    {
                        "type": "TEMPLATE",
                        "key": "pixelId",
                        "value": "{{OpenAI Pixel ID}}"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "userProvidedData",
                        "value": "{{Von Nutzern bereitgestellte Daten}}"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "useGa4DataLayer",
                        "value": "true"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "eventName",
                        "value": "order_created"
                    }
                ],
                "fingerprint": "1790069991844",
                "firingTriggerId": [
                    "11"
                ],
                "tagFiringOption": "ONCE_PER_EVENT",
                "monitoringMetadata": {
                    "type": "MAP"
                },
                "consentSettings": {
                    "consentStatus": "NOT_SET"
                }
            },
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "tagId": "12",
                "name": "OpenAI - Pageview",
                "type": "cvt_264750429_8",
                "parameter": [
                    {
                        "type": "TEMPLATE",
                        "key": "pixelId",
                        "value": "{{OpenAI Pixel ID}}"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "useGa4DataLayer",
                        "value": "false"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "eventName",
                        "value": "page_viewed"
                    }
                ],
                "fingerprint": "1790070809583",
                "firingTriggerId": [
                    "2147479553"
                ],
                "tagFiringOption": "ONCE_PER_EVENT",
                "monitoringMetadata": {
                    "type": "MAP"
                },
                "consentSettings": {
                    "consentStatus": "NOT_SET"
                }
            },
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "tagId": "14",
                "name": "OpenAI - contents_viewed",
                "type": "cvt_264750429_8",
                "parameter": [
                    {
                        "type": "TEMPLATE",
                        "key": "pixelId",
                        "value": "{{OpenAI Pixel ID}}"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "useGa4DataLayer",
                        "value": "true"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "eventName",
                        "value": "contents_viewed"
                    }
                ],
                "fingerprint": "1790070529418",
                "firingTriggerId": [
                    "13"
                ],
                "tagFiringOption": "ONCE_PER_EVENT",
                "monitoringMetadata": {
                    "type": "MAP"
                },
                "consentSettings": {
                    "consentStatus": "NOT_SET"
                }
            },
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "tagId": "16",
                "name": "OpenAI - items_added",
                "type": "cvt_264750429_8",
                "parameter": [
                    {
                        "type": "TEMPLATE",
                        "key": "pixelId",
                        "value": "{{OpenAI Pixel ID}}"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "useGa4DataLayer",
                        "value": "true"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "eventName",
                        "value": "items_added"
                    }
                ],
                "fingerprint": "1790070638849",
                "firingTriggerId": [
                    "15"
                ],
                "tagFiringOption": "ONCE_PER_EVENT",
                "monitoringMetadata": {
                    "type": "MAP"
                },
                "consentSettings": {
                    "consentStatus": "NOT_SET"
                }
            },
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "tagId": "18",
                "name": "OpenAI - checkout_started",
                "type": "cvt_264750429_8",
                "parameter": [
                    {
                        "type": "TEMPLATE",
                        "key": "pixelId",
                        "value": "{{OpenAI Pixel ID}}"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "userProvidedData",
                        "value": "{{Von Nutzern bereitgestellte Daten}}"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "useGa4DataLayer",
                        "value": "true"
                    },
                    {
                        "type": "TEMPLATE",
                        "key": "eventName",
                        "value": "checkout_started"
                    }
                ],
                "fingerprint": "1790070788352",
                "firingTriggerId": [
                    "17"
                ],
                "tagFiringOption": "ONCE_PER_EVENT",
                "monitoringMetadata": {
                    "type": "MAP"
                },
                "consentSettings": {
                    "consentStatus": "NOT_SET"
                }
            }
        ],
        "trigger": [
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "triggerId": "11",
                "name": "Event - purchase",
                "type": "CUSTOM_EVENT",
                "customEventFilter": [
                    {
                        "type": "EQUALS",
                        "parameter": [
                            {
                                "type": "TEMPLATE",
                                "key": "arg0",
                                "value": "{{_event}}"
                            },
                            {
                                "type": "TEMPLATE",
                                "key": "arg1",
                                "value": "purchase"
                            }
                        ]
                    }
                ],
                "fingerprint": "1789998605976"
            },
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "triggerId": "13",
                "name": "Event - view_item",
                "type": "CUSTOM_EVENT",
                "customEventFilter": [
                    {
                        "type": "EQUALS",
                        "parameter": [
                            {
                                "type": "TEMPLATE",
                                "key": "arg0",
                                "value": "{{_event}}"
                            },
                            {
                                "type": "TEMPLATE",
                                "key": "arg1",
                                "value": "view_item"
                            }
                        ]
                    }
                ],
                "fingerprint": "1790070491614"
            },
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "triggerId": "15",
                "name": "Event - add_to_cart",
                "type": "CUSTOM_EVENT",
                "customEventFilter": [
                    {
                        "type": "EQUALS",
                        "parameter": [
                            {
                                "type": "TEMPLATE",
                                "key": "arg0",
                                "value": "{{_event}}"
                            },
                            {
                                "type": "TEMPLATE",
                                "key": "arg1",
                                "value": "add_to_cart"
                            }
                        ]
                    }
                ],
                "fingerprint": "1790070625758"
            },
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "triggerId": "17",
                "name": "Event - begin_checkout",
                "type": "CUSTOM_EVENT",
                "customEventFilter": [
                    {
                        "type": "EQUALS",
                        "parameter": [
                            {
                                "type": "TEMPLATE",
                                "key": "arg0",
                                "value": "{{_event}}"
                            },
                            {
                                "type": "TEMPLATE",
                                "key": "arg1",
                                "value": "begin_checkout"
                            }
                        ]
                    }
                ],
                "fingerprint": "1790070768072"
            }
        ],
        "variable": [
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "variableId": "5",
                "name": "Von Nutzern bereitgestellte Daten",
                "type": "awec",
                "parameter": [
                    {
                        "type": "TEMPLATE",
                        "key": "mode",
                        "value": "AUTO"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "autoPhoneEnabled",
                        "value": "true"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "autoAddressEnabled",
                        "value": "true"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "autoEmailEnabled",
                        "value": "true"
                    },
                    {
                        "type": "BOOLEAN",
                        "key": "enableElementBlocking",
                        "value": "false"
                    }
                ],
                "fingerprint": "1790075838319",
                "formatValue": {}
            },
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "variableId": "9",
                "name": "OpenAI Pixel ID",
                "type": "c",
                "parameter": [
                    {
                        "type": "TEMPLATE",
                        "key": "value",
                        "value": "DEINEPIXELID"
                    }
                ],
                "fingerprint": "1790077498243",
                "formatValue": {}
            }
        ],
        "builtInVariable": [
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "type": "PAGE_URL",
                "name": "Page URL"
            },
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "type": "PAGE_HOSTNAME",
                "name": "Page Hostname"
            },
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "type": "PAGE_PATH",
                "name": "Page Path"
            },
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "type": "REFERRER",
                "name": "Referrer"
            },
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "type": "EVENT",
                "name": "Event"
            }
        ],
        "fingerprint": "1790077550604",
        "tagManagerUrl": "https://tagmanager.google.com/#/versions/accounts/6218296892/containers/264750429/versions/0?apiLink=version",
        "customTemplate": [
            {
                "accountId": "6218296892",
                "containerId": "264750429",
                "templateId": "8",
                "name": "OpenAI Ads Pixel for E-Commerce",
                "fingerprint": "1790075450114",
                "templateData": "___TERMS_OF_SERVICE___\n\nBy creating or modifying this file you agree to Google Tag Manager's Community\nTemplate Gallery Developer Terms of Service available at\nhttps://developers.google.com/tag-manager/gallery-tos (or such other URL as\nGoogle may provide), as modified from time to time.\n\n\n___INFO___\n\n{\n  \"type\": \"TAG\",\n  \"id\": \"cvt_temp_public_id\",\n  \"version\": 1,\n  \"securityGroups\": [],\n  \"displayName\": \"OpenAI Ads Pixel for E-Commerce\",\n  \"brand\": {\n    \"id\": \"brand_dummy\",\n    \"displayName\": \"By Kussin\"\n  },\n  \"description\": \"Developed by Kussin | eCommerce und Online-Marketing GmbH\",\n  \"containerContexts\": [\n    \"WEB\"\n  ]\n}\n\n\n___TEMPLATE_PARAMETERS___\n\n[\n  {\n    \"type\": \"TEXT\",\n    \"name\": \"pixelId\",\n    \"displayName\": \"\",\n    \"simpleValueType\": true\n  },\n  {\n    \"type\": \"SELECT\",\n    \"name\": \"eventName\",\n    \"displayName\": \"\",\n    \"macrosInSelect\": true,\n    \"selectItems\": [\n      {\n        \"value\": \"page_viewed\",\n        \"displayValue\": \"page_viewed\"\n      },\n      {\n        \"value\": \"order_created\",\n        \"displayValue\": \"order_created\"\n      },\n      {\n        \"value\": \"items_added\",\n        \"displayValue\": \"items_added\"\n      },\n      {\n        \"value\": \"contents_viewed\",\n        \"displayValue\": \"contents_viewed\"\n      },\n      {\n        \"value\": \"checkout_started\",\n        \"displayValue\": \"checkout_started\"\n      }\n    ],\n    \"simpleValueType\": true\n  },\n  {\n    \"type\": \"CHECKBOX\",\n    \"name\": \"useGa4DataLayer\",\n    \"checkboxText\": \"GA4 E-Commerce Datalayer nutzen\",\n    \"simpleValueType\": true\n  },\n  {\n    \"type\": \"TEXT\",\n    \"name\": \"userProvidedData\",\n    \"displayName\": \"Google User-Provided Data\",\n    \"simpleValueType\": true\n  }\n]\n\n\n___SANDBOXED_JS_FOR_WEB_TEMPLATE___\n\nconst callInWindow = require('callInWindow');\nconst createArgumentsQueue = require('createArgumentsQueue');\nconst copyFromWindow = require('copyFromWindow');\nconst copyFromDataLayer = require('copyFromDataLayer');\nconst setInWindow = require('setInWindow');\nconst injectScript = require('injectScript');\nconst sha256 = require('sha256');\nconst isConsentGranted = require('isConsentGranted');\nconst addConsentListener = require('addConsentListener');\nconst makeInteger = require('makeInteger');\nconst makeNumber = require('makeNumber');\nconst makeString = require('makeString');\nconst Math = require('Math');\n\nconst SDK_URL = 'https://bzrcdn.openai.com/sdk/oaiq.min.js';\n\n\nfunction callOaiq(command, arg1, arg2, arg3) {\n  if (copyFromWindow('oaiq')) {\n    if (arg3 !== undefined) {\n      callInWindow('oaiq', command, arg1, arg2, arg3);\n    } else if (arg2 !== undefined) {\n      callInWindow('oaiq', command, arg1, arg2);\n    } else if (arg1 !== undefined) {\n      callInWindow('oaiq', command, arg1);\n    } else {\n      callInWindow('oaiq', command);\n    }\n\n    return;\n  }\n\n  const oaiq = createArgumentsQueue(\n    'oaiq',\n    'oaiq.queue'\n  );\n\n  if (arg3 !== undefined) {\n    oaiq(command, arg1, arg2, arg3);\n  } else if (arg2 !== undefined) {\n    oaiq(command, arg1, arg2);\n  } else if (arg1 !== undefined) {\n    oaiq(command, arg1);\n  } else {\n    oaiq(command);\n  }\n}\n\n\nfunction getEventKey() {\n  return '__oaiq_sent_' + makeString(data.eventName);\n}\n\n\nfunction isEventAlreadySent() {\n  return copyFromWindow(getEventKey()) === true;\n}\n\n\nfunction markEventAsSent() {\n  setInWindow(\n    getEventKey(),\n    true,\n    true\n  );\n}\n\n\nfunction useGa4() {\n  return data.useGa4DataLayer !== false;\n}\n\n\nfunction toMinorUnits(value) {\n  if (\n    value === undefined ||\n    value === null ||\n    value === ''\n  ) {\n    return undefined;\n  }\n\n  const numberValue = makeNumber(value);\n\n  if (numberValue === undefined) {\n    return undefined;\n  }\n\n  return Math.round(numberValue * 100);\n}\n\n\nfunction buildGa4Contents() {\n  const items = copyFromDataLayer(\n    'ecommerce.items',\n    2\n  );\n\n  const currency = copyFromDataLayer(\n    'ecommerce.currency',\n    2\n  );\n\n  const contents = [];\n\n  if (!items || !items.length) {\n    return contents;\n  }\n\n  for (\n    let i = 0;\n    i < items.length;\n    i += 1\n  ) {\n    const item = items[i];\n\n    if (!item) {\n      continue;\n    }\n\n    const content = {\n      content_type: 'product'\n    };\n\n    if (item.item_id !== undefined) {\n      content.id = makeString(item.item_id);\n    }\n\n    if (item.item_name !== undefined) {\n      content.name = makeString(item.item_name);\n    }\n\n    if (item.quantity !== undefined) {\n      content.quantity = makeInteger(item.quantity);\n    }\n\n    if (item.price !== undefined) {\n      content.amount = toMinorUnits(item.price);\n    }\n\n    if (currency) {\n      content.currency = makeString(currency);\n    }\n\n    contents.push(content);\n  }\n\n  return contents;\n}\n\n\nfunction buildEventData() {\n  const eventData = {\n    type: 'contents'\n  };\n\n  if (!useGa4()) {\n    return eventData;\n  }\n\n  const value = copyFromDataLayer(\n    'ecommerce.value',\n    2\n  );\n\n  const currency = copyFromDataLayer(\n    'ecommerce.currency',\n    2\n  );\n\n  const contents = buildGa4Contents();\n\n  if (\n    value !== undefined &&\n    value !== null &&\n    value !== ''\n  ) {\n    eventData.amount = toMinorUnits(value);\n  }\n\n  if (currency) {\n    eventData.currency = makeString(currency);\n  }\n\n  if (contents.length) {\n    eventData.contents = contents;\n  }\n\n  return eventData;\n}\n\n\n/*\n * Google User-Provided Data kann address entweder\n * als Objekt oder als Array liefern.\n */\nfunction getAddress(userData) {\n  if (!userData || !userData.address) {\n    return {};\n  }\n\n  if (\n    userData.address.length &&\n    userData.address[0]\n  ) {\n    return userData.address[0];\n  }\n\n  return userData.address;\n}\n\n\n/*\n * OpenAI:\n * Email -> trim + lowercase\n */\nfunction normalizeEmail(value) {\n  return makeString(value)\n    .trim()\n    .toLowerCase();\n}\n\n\n/*\n * OpenAI:\n * Telefonnummer:\n * - nur Ziffern behalten\n * - führendes + fällt dadurch weg\n * - führende Nullen entfernen\n *\n * Der Google-Wert sollte idealerweise bereits\n * die internationale Landesvorwahl enthalten.\n */\nfunction normalizePhone(value) {\n  const input = makeString(value).trim();\n\n  let result = '';\n\n  for (\n    let i = 0;\n    i < input.length;\n    i += 1\n  ) {\n    const character = input.charAt(i);\n\n    if (\n      character >= '0' &&\n      character <= '9'\n    ) {\n      result += character;\n    }\n  }\n\n  while (\n    result.length &&\n    result.charAt(0) === '0'\n  ) {\n    result = result.substring(1);\n  }\n\n  if (\n    result.length < 8 ||\n    result.length > 15\n  ) {\n    return undefined;\n  }\n\n  return result;\n}\n\n\n/*\n * OpenAI:\n * Vor-/Nachname:\n * - lowercase\n * - Whitespace entfernen\n * - ASCII-Punctuation entfernen\n * - Nicht-ASCII-Zeichen wie é behalten\n */\nfunction normalizeName(value) {\n  const input =\n    makeString(value).toLowerCase();\n\n  const removeCharacters =\n    ' \\t\\n\\r!\"#$%&\\'()*+,-./:;<=>?@[\\\\]^_`{|}~';\n\n  let result = '';\n\n  for (\n    let i = 0;\n    i < input.length;\n    i += 1\n  ) {\n    const character = input.charAt(i);\n\n    if (\n      removeCharacters.indexOf(character) === -1\n    ) {\n      result += character;\n    }\n  }\n\n  return result;\n}\n\n\nfunction addAddressFields(user, userData) {\n  const address = getAddress(userData);\n\n  if (address.country) {\n    user.country =\n      makeString(address.country)\n        .trim()\n        .toUpperCase();\n  }\n\n  if (address.city) {\n    user.city =\n      makeString(address.city).trim();\n  }\n\n  if (address.region) {\n    user.region =\n      makeString(address.region).trim();\n  }\n\n  if (address.postal_code) {\n    user.postal_code =\n      makeString(address.postal_code).trim();\n  }\n\n  return user;\n}\n\n\nfunction hasUserData(user) {\n  return !!(\n    user.email_sha256 ||\n    user.phone_number_sha256 ||\n    user.first_name_sha256 ||\n    user.last_name_sha256 ||\n    user.country ||\n    user.city ||\n    user.region ||\n    user.postal_code\n  );\n}\n\n\nfunction sendOpenAIEvent(user) {\n  if (isEventAlreadySent()) {\n    data.gtmOnSuccess();\n    return;\n  }\n\n  if (!isConsentGranted('ad_storage')) {\n    return;\n  }\n\n  markEventAsSent();\n\n  const initConfig = {\n    pixelId: data.pixelId\n  };\n\n  if (\n    isConsentGranted('ad_user_data') &&\n    user &&\n    hasUserData(user)\n  ) {\n    initConfig.user = user;\n  }\n\n  callOaiq(\n    'init',\n    initConfig\n  );\n\n  callOaiq(\n    'measure',\n    data.eventName,\n    buildEventData(),\n    {}\n  );\n\n  injectScript(\n    SDK_URL,\n    data.gtmOnSuccess,\n    data.gtmOnFailure,\n    'openai_ads_pixel_sdk'\n  );\n}\n\n\n/*\n * Hashing sequenziell durchführen.\n * Dadurch können beliebig viele erkannte\n * Google-User-Daten kombiniert werden.\n */\nfunction buildUserDataAndSend() {\n  const userData =\n    data.userProvidedData || {};\n\n  const address =\n    getAddress(userData);\n\n  const user = {};\n\n  addAddressFields(\n    user,\n    userData\n  );\n\n\n  function hashLastName() {\n    /*\n     * Bereits gehashter Google-Wert bevorzugen.\n     */\n    if (address.sha256_last_name) {\n      user.last_name_sha256 =\n        address.sha256_last_name;\n\n      sendOpenAIEvent(user);\n      return;\n    }\n\n    if (!address.last_name) {\n      sendOpenAIEvent(user);\n      return;\n    }\n\n    const normalized =\n      normalizeName(address.last_name);\n\n    if (!normalized) {\n      sendOpenAIEvent(user);\n      return;\n    }\n\n    sha256(\n      normalized,\n      function(hash) {\n        user.last_name_sha256 = hash;\n        sendOpenAIEvent(user);\n      },\n      data.gtmOnFailure,\n      {\n        outputEncoding: 'hex'\n      }\n    );\n  }\n\n\n  function hashFirstName() {\n    if (address.sha256_first_name) {\n      user.first_name_sha256 =\n        address.sha256_first_name;\n\n      hashLastName();\n      return;\n    }\n\n    if (!address.first_name) {\n      hashLastName();\n      return;\n    }\n\n    const normalized =\n      normalizeName(address.first_name);\n\n    if (!normalized) {\n      hashLastName();\n      return;\n    }\n\n    sha256(\n      normalized,\n      function(hash) {\n        user.first_name_sha256 = hash;\n        hashLastName();\n      },\n      data.gtmOnFailure,\n      {\n        outputEncoding: 'hex'\n      }\n    );\n  }\n\n\n  function hashPhone() {\n    /*\n     * Google verwendet je nach Implementierung\n     * sha256_phone_number.\n     */\n    if (userData.sha256_phone_number) {\n      user.phone_number_sha256 =\n        userData.sha256_phone_number;\n\n      hashFirstName();\n      return;\n    }\n\n    if (!userData.phone_number) {\n      hashFirstName();\n      return;\n    }\n\n    const normalized =\n      normalizePhone(\n        userData.phone_number\n      );\n\n    if (!normalized) {\n      hashFirstName();\n      return;\n    }\n\n    sha256(\n      normalized,\n      function(hash) {\n        user.phone_number_sha256 = hash;\n        hashFirstName();\n      },\n      data.gtmOnFailure,\n      {\n        outputEncoding: 'hex'\n      }\n    );\n  }\n\n\n  function hashEmail() {\n    if (userData.sha256_email_address) {\n      user.email_sha256 =\n        userData.sha256_email_address;\n\n      hashPhone();\n      return;\n    }\n\n    if (!userData.email) {\n      hashPhone();\n      return;\n    }\n\n    const normalized =\n      normalizeEmail(userData.email);\n\n    if (!normalized) {\n      hashPhone();\n      return;\n    }\n\n    sha256(\n      normalized,\n      function(hash) {\n        user.email_sha256 = hash;\n        hashPhone();\n      },\n      data.gtmOnFailure,\n      {\n        outputEncoding: 'hex'\n      }\n    );\n  }\n\n\n  hashEmail();\n}\n\n\nfunction prepareAndSend() {\n  if (isEventAlreadySent()) {\n    data.gtmOnSuccess();\n    return;\n  }\n\n  if (!isConsentGranted('ad_storage')) {\n    return;\n  }\n\n  /*\n   * Kein ad_user_data:\n   * Conversion wird trotzdem gesendet,\n   * aber ohne User Matching.\n   */\n  if (!isConsentGranted('ad_user_data')) {\n    sendOpenAIEvent({});\n    return;\n  }\n\n  buildUserDataAndSend();\n}\n\n\nif (isConsentGranted('ad_storage')) {\n  prepareAndSend();\n} else {\n  addConsentListener(\n    'ad_storage',\n    function(consentType, granted) {\n      if (\n        granted &&\n        !isEventAlreadySent()\n      ) {\n        prepareAndSend();\n      }\n    }\n  );\n}\n\n\naddConsentListener(\n  'ad_user_data',\n  function(consentType, granted) {\n    if (\n      granted &&\n      !isEventAlreadySent() &&\n      isConsentGranted('ad_storage')\n    ) {\n      prepareAndSend();\n    }\n  }\n);\n\n\n___WEB_PERMISSIONS___\n\n[\n  {\n    \"instance\": {\n      \"key\": {\n        \"publicId\": \"access_globals\",\n        \"versionId\": \"1\"\n      },\n      \"param\": [\n        {\n          \"key\": \"keys\",\n          \"value\": {\n            \"type\": 2,\n            \"listItem\": [\n              {\n                \"type\": 3,\n                \"mapKey\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"key\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"read\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"write\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"execute\"\n                  }\n                ],\n                \"mapValue\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"oaiq\"\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  }\n                ]\n              },\n              {\n                \"type\": 3,\n                \"mapKey\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"key\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"read\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"write\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"execute\"\n                  }\n                ],\n                \"mapValue\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"oaiq.queue\"\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": false\n                  }\n                ]\n              },\n              {\n                \"type\": 3,\n                \"mapKey\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"key\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"read\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"write\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"execute\"\n                  }\n                ],\n                \"mapValue\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"__oaiq_sent_page_viewed\"\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": false\n                  }\n                ]\n              },\n              {\n                \"type\": 3,\n                \"mapKey\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"key\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"read\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"write\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"execute\"\n                  }\n                ],\n                \"mapValue\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"__oaiq_sent_order_created\"\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": false\n                  }\n                ]\n              },\n              {\n                \"type\": 3,\n                \"mapKey\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"key\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"read\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"write\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"execute\"\n                  }\n                ],\n                \"mapValue\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"__oaiq_sent_contents_viewed\"\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": false\n                  }\n                ]\n              },\n              {\n                \"type\": 3,\n                \"mapKey\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"key\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"read\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"write\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"execute\"\n                  }\n                ],\n                \"mapValue\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"__oaiq_sent_items_added\"\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": false\n                  }\n                ]\n              },\n              {\n                \"type\": 3,\n                \"mapKey\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"key\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"read\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"write\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"execute\"\n                  }\n                ],\n                \"mapValue\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"__oaiq_sent_checkout_started\"\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": false\n                  }\n                ]\n              }\n            ]\n          }\n        }\n      ]\n    },\n    \"clientAnnotations\": {\n      \"isEditedByUser\": true\n    },\n    \"isRequired\": true\n  },\n  {\n    \"instance\": {\n      \"key\": {\n        \"publicId\": \"inject_script\",\n        \"versionId\": \"1\"\n      },\n      \"param\": [\n        {\n          \"key\": \"urls\",\n          \"value\": {\n            \"type\": 2,\n            \"listItem\": [\n              {\n                \"type\": 1,\n                \"string\": \"https://bzrcdn.openai.com/sdk/oaiq.min.js\"\n              }\n            ]\n          }\n        }\n      ]\n    },\n    \"clientAnnotations\": {\n      \"isEditedByUser\": true\n    },\n    \"isRequired\": true\n  },\n  {\n    \"instance\": {\n      \"key\": {\n        \"publicId\": \"access_consent\",\n        \"versionId\": \"1\"\n      },\n      \"param\": [\n        {\n          \"key\": \"consentTypes\",\n          \"value\": {\n            \"type\": 2,\n            \"listItem\": [\n              {\n                \"type\": 3,\n                \"mapKey\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"consentType\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"read\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"write\"\n                  }\n                ],\n                \"mapValue\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"ad_storage\"\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": false\n                  }\n                ]\n              },\n              {\n                \"type\": 3,\n                \"mapKey\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"consentType\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"read\"\n                  },\n                  {\n                    \"type\": 1,\n                    \"string\": \"write\"\n                  }\n                ],\n                \"mapValue\": [\n                  {\n                    \"type\": 1,\n                    \"string\": \"ad_user_data\"\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": true\n                  },\n                  {\n                    \"type\": 8,\n                    \"boolean\": false\n                  }\n                ]\n              }\n            ]\n          }\n        }\n      ]\n    },\n    \"clientAnnotations\": {\n      \"isEditedByUser\": true\n    },\n    \"isRequired\": true\n  },\n  {\n    \"instance\": {\n      \"key\": {\n        \"publicId\": \"read_data_layer\",\n        \"versionId\": \"1\"\n      },\n      \"param\": [\n        {\n          \"key\": \"allowedKeys\",\n          \"value\": {\n            \"type\": 1,\n            \"string\": \"specific\"\n          }\n        },\n        {\n          \"key\": \"keyPatterns\",\n          \"value\": {\n            \"type\": 2,\n            \"listItem\": [\n              {\n                \"type\": 1,\n                \"string\": \"ecommerce.value\"\n              },\n              {\n                \"type\": 1,\n                \"string\": \"ecommerce.currency\"\n              },\n              {\n                \"type\": 1,\n                \"string\": \"ecommerce.items\"\n              },\n              {\n                \"type\": 1,\n                \"string\": \"ecommerce.items.*\"\n              }\n            ]\n          }\n        }\n      ]\n    },\n    \"clientAnnotations\": {\n      \"isEditedByUser\": true\n    },\n    \"isRequired\": true\n  }\n]\n\n\n___TESTS___\n\nscenarios: []\n\n\n___NOTES___\n\n\n\n\n"
            }
        ]
    }
}