{"count":285,"next":"https://us.posthog.com/api/public_hog_function_templates/?limit=100&offset=100&type=destination","previous":null,"results":[{"id":"template-meta-ads","name":"Meta Ads Conversions","description":"Send conversion events to Meta Ads","code":"if (empty(inputs.pixelId) or empty(inputs.accessToken)) {\n    throw Error('Pixel ID and access token are required')\n}\n\nlet body := {\n    'data': [\n        {\n            'event_name': inputs.eventName,\n            'event_id': inputs.eventId,\n            'event_time': inputs.eventTime,\n            'action_source': inputs.actionSource,\n            'user_data': {},\n            'custom_data': {}\n        }\n    ],\n    'access_token': inputs.accessToken\n}\n\nif (not empty(inputs.testEventCode)) {\n    body.test_event_code := inputs.testEventCode\n}\n\nif (not empty(inputs.eventSourceUrl)) {\n    body.data.1.event_source_url := inputs.eventSourceUrl\n}\n\n// Helper function to parse JSON arrays from string values\nfn parseValueIfArray(value) {\n    if (typeof(value) == 'string') {\n        let trimmed := trim(value)\n        if (startsWith(trimmed, '[')) {\n            try {\n                return jsonParse(trimmed)\n            } catch {\n                return value\n            }\n        }\n    }\n    return value\n}\n\n// Meta rejects an ad click older than 90 days, the lifetime of the pixel's _fbc cookie, so a stale\n// click is dropped instead of sent. The value states its own click time, in segment 3. Meta's\n// parameter builder library appends a fifth segment, which stays on the value it sends back.\nfn freshClickId(value) {\n    if (typeof(value) != 'string') {\n        return null\n    }\n    if (not match(value, '^fb[.][0-9]+[.][0-9]+[.][A-Za-z0-9_-]+([.][A-Za-z0-9_-]+)?$')) {\n        return null\n    }\n    // A click cannot precede the conversion it caused. The tolerance holds a click and the pageview\n    // that reports it, stamped from one browser clock, in either order.\n    let ageMs := toUnixTimestampMilli(event.timestamp) - toFloat(splitByString('.', value)[3])\n    if (ageMs < -300000 or ageMs >= 7776000000) {\n        return null\n    }\n    return value\n}\n\nfor (let key, value in inputs.userData) {\n    let cleaned := key == 'fbc' ? freshClickId(value) : parseValueIfArray(value)\n    if (not empty(cleaned)) {\n        body.data.1.user_data[key] := cleaned\n    }\n}\n\nfor (let key, value in inputs.customData) {\n    if (not empty(value)) {\n        body.data.1.custom_data[key] := parseValueIfArray(value)\n    }\n}\n\nlet res := fetch(f'https://graph.facebook.com/v25.0/{inputs.pixelId}/events', {\n    'method': 'POST',\n    'headers': {\n        'Content-Type': 'application/json',\n    },\n    'body': body\n})\nif (res.status >= 400) {\n    throw Error(f'Error from graph.facebook.com (status {res.status}): {res.body}')\n}","code_language":"hog","inputs_schema":[{"key":"accessToken","type":"string","label":"Access token","secret":true,"required":true,"description":"Check out this page on how to obtain such a token: https://developers.facebook.com/docs/marketing-api/conversions-api/get-started"},{"key":"pixelId","type":"string","label":"Pixel ID","secret":false,"required":true,"description":"You must obtain a Pixel ID to use the Conversions API. If you've already set up a Pixel for your website, we recommend that you use the same Pixel ID for your browser and server events."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event."},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":false,"description":"The URL of the page where the event occurred."},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{toInt(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred. You must send this date in GMT time zone."},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"Email - Conversion happened over email.","value":"email"},{"label":"Website - Conversion was made on your website.","value":"website"},{"label":"App - Conversion was made on your mobile app.","value":"app"},{"label":"Phone call - Conversion was made over the phone.","value":"phone_call"},{"label":"Chat - Conversion was made via a messaging app, SMS, or online messaging feature.","value":"chat"},{"label":"Physical store - Conversion was made in person at your physical store.","value":"physical_store"},{"label":"System generated - Conversion happened automatically, for example, a subscription renewal that is set to auto-pay each month.","value":"system_generated"},{"label":"Business messaging - Conversion was made from ads that click to Messenger, Instagram or WhatsApp.","value":"business_messaging"},{"label":"Other - Conversion happened in a way that is not listed.","value":"other"}],"default":"website","required":true,"description":"This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people."},{"key":"userData","type":"dictionary","label":"User data","secret":false,"default":{"em":"{sha256Hex(lower(person.properties.email))}","fn":"{sha256Hex(lower(person.properties.first_name))}","ln":"{sha256Hex(lower(person.properties.last_name))}","fbc":"{person.properties.fbc ?? person.properties.$fbc ?? (not empty(event.properties.fbclid) ? f'fb.1.{toUnixTimestampMilli(event.timestamp)}.{event.properties.fbclid}' : '')}","fbp":"{person.properties.fbp ?? person.properties.$fbp ?? ''}","client_user_agent":"{event.properties.$raw_user_agent}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters"},{"key":"testEventCode","type":"string","label":"Test Event Code","secret":false,"default":"","required":false,"description":"Use this field to specify that events should be test events rather than actual traffic. You'll want to remove your Test Event Code when sending real traffic through this integration."}],"type":"destination","status":"alpha","category":["Advertisement"],"free":false,"icon_url":"/static/services/meta-ads.png","filters":{"events":[],"actions":[],"filter_test_accounts":true},"masking":null,"mapping_templates":[{"name":"Page Viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"$pageview","name":"Pageview","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"PageView","required":true,"description":"A standard event or custom event name."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data"}]},{"name":"Product Viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Viewed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"ViewContent","required":true,"description":"A standard event or custom event name."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{empty(event.properties.value) and empty(event.properties.revenue) and empty(event.properties.price) ? '' : toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","contents":"{not empty(event.properties.quantity) and (not empty(event.properties.sku) or not empty(event.properties.product_id)) ? [{'id': event.properties.sku ?? event.properties.product_id, 'quantity': event.properties.quantity, 'item_price': event.properties.price}] : []}","currency":"{event.properties.currency ?? 'USD'}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : (not empty(event.properties.product_id) ? [event.properties.product_id] : [])}","content_name":"{event.properties.name}","content_type":"product","content_category":"{event.properties.category}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data"}]},{"name":"Products Searched","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Products Searched","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"Search","required":true,"description":"A standard event or custom event name."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : (not empty(event.properties.product_id) ? [event.properties.product_id] : [])}","search_string":"{event.properties.query}","content_category":"{event.properties.category}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data"}]},{"name":"Product Added","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Added","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"AddToCart","required":true,"description":"A standard event or custom event name."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{empty(event.properties.value) and empty(event.properties.revenue) and empty(event.properties.price) ? '' : toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","contents":"{not empty(event.properties.quantity) and (not empty(event.properties.sku) or not empty(event.properties.product_id)) ? [{'id': event.properties.sku ?? event.properties.product_id, 'quantity': event.properties.quantity, 'item_price': event.properties.price}] : []}","currency":"{event.properties.currency ?? 'USD'}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : (not empty(event.properties.product_id) ? [event.properties.product_id] : [])}","content_name":"{event.properties.name}","content_type":"product","content_category":"{event.properties.category}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data"}]},{"name":"Checkout Started","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Checkout Started","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"InitiateCheckout","required":true,"description":"A standard event or custom event name."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{empty(event.properties.value) and empty(event.properties.revenue) and empty(event.properties.price) ? '' : toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","contents":"{arrayMap(x -> ({'id': x.sku ?? x.product_id, 'quantity': x.quantity, 'item_price': x.price}), arrayFilter(x -> (not empty(x.sku) or not empty(x.product_id)) and not empty(x.quantity), event.properties.products ?? []))}","currency":"{event.properties.currency ?? 'USD'}","num_items":"{arrayReduce((acc, curr) -> acc + curr.quantity, event.properties.products ?? [], 0)}","content_ids":"{arrayMap(x -> x.sku ?? x.product_id, event.properties.products ?? [])}","content_type":"product"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data"}]},{"name":"Order Completed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Order Completed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"Purchase","required":true,"description":"A standard event or custom event name."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{empty(event.properties.value) and empty(event.properties.revenue) and empty(event.properties.price) ? '' : toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","contents":"{arrayMap(x -> ({'id': x.sku ?? x.product_id, 'quantity': x.quantity, 'item_price': x.price}), arrayFilter(x -> (not empty(x.sku) or not empty(x.product_id)) and not empty(x.quantity), event.properties.products ?? []))}","currency":"{event.properties.currency ?? 'USD'}","order_id":"{event.properties.order_id}","num_items":"{arrayReduce((acc, curr) -> acc + curr.quantity, event.properties.products ?? [], 0)}","content_ids":"{arrayMap(x -> x.sku ?? x.product_id, event.properties.products ?? [])}","content_type":"product"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data"}]},{"name":"Lead Generated","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Lead Generated","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"Lead","required":true,"description":"A standard event or custom event name."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{empty(event.properties.value) and empty(event.properties.revenue) and empty(event.properties.price) ? '' : toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","currency":"{event.properties.currency ?? 'USD'}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data"}]},{"name":"Signed Up","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Signed Up","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"CompleteRegistration","required":true,"description":"A standard event or custom event name."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{empty(event.properties.value) and empty(event.properties.revenue) and empty(event.properties.price) ? '' : toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","currency":"{event.properties.currency ?? 'USD'}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data"}]}]},{"id":"template-google-ads","name":"Google Ads Conversions","description":"Send conversion events to Google Ads","code":"let userIdentifiers := []\nif (not empty(inputs.email)) {\n    userIdentifiers := arrayPushBack(userIdentifiers, {'hashed_email': sha256Hex(lower(trim(inputs.email)))})\n}\nif (not empty(inputs.phone)) {\n    userIdentifiers := arrayPushBack(userIdentifiers, {'hashed_phone_number': sha256Hex(lower(trim(inputs.phone)))})\n}\n\nif (empty(inputs.gclid) and empty(userIdentifiers)) {\n    print('No `gclid` or user identifiers. Skipping...')\n    return\n}\n\nlet conversion := {\n    'conversion_action': f'customers/{splitByString('/', inputs.customerId)[1]}/conversionActions/{inputs.conversionActionId}',\n    'conversion_date_time': inputs.conversionDateTime\n}\nif (not empty(inputs.gclid)) {\n    conversion.gclid := inputs.gclid\n}\nif (not empty(userIdentifiers)) {\n    conversion.user_identifiers := userIdentifiers\n}\nif (not empty(inputs.conversionValue)) {\n    conversion.conversion_value := inputs.conversionValue\n}\nif (not empty(inputs.currencyCode)) {\n    conversion.currency_code := inputs.currencyCode\n}\nif (not empty(inputs.orderId)) {\n    conversion.order_id := inputs.orderId\n}\n\nlet body := {\n    'conversions': [conversion],\n    'partialFailure': true\n}\n\nlet res := fetch(f'https://googleads.googleapis.com/v24/customers/{splitByString('/', inputs.customerId)[1]}:uploadClickConversions', {\n    'method': 'POST',\n    'headers': {\n        'Authorization': f'Bearer {inputs.oauth.access_token}',\n        'Content-Type': 'application/json',\n        'login-customer-id': splitByString('/', inputs.customerId)[2]\n    },\n    'body': body\n})\n\nif (res.status >= 400) {\n    throw Error(f'Error from googleads.googleapis.com (status {res.status}): {res.body}')\n} else if (not empty(res.body.partialFailureError)) {\n    throw Error(f'Error from googleads.googleapis.com (status {res.status}): {res.body.partialFailureError.message}')\n}","code_language":"hog","inputs_schema":[{"key":"oauth","type":"integration","label":"Google Ads account","secret":false,"required":true,"integration":"google-ads","requiredScopes":"https://www.googleapis.com/auth/adwords https://www.googleapis.com/auth/userinfo.email"},{"key":"customerId","type":"integration_field","label":"Customer ID","secret":false,"required":true,"description":"ID of your Google Ads Account. This should be 10-digits and in XXX-XXX-XXXX format.","integration_key":"oauth","integration_field":"google_ads_customer_id"}],"type":"destination","status":"alpha","category":["Advertisement"],"free":false,"icon_url":"/static/services/google-ads.png","filters":null,"masking":null,"mapping_templates":[{"name":"Conversion","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[]},"inputs":null,"inputs_schema":[{"key":"conversionActionId","type":"integration_field","label":"Conversion action","secret":false,"required":true,"description":"The Conversion action associated with this conversion.","requires_field":"customerId","integration_key":"oauth","integration_field":"google_ads_conversion_action"},{"key":"gclid","type":"string","label":"Google Click ID (gclid)","secret":false,"default":"{person.properties.gclid ?? person.properties.$initial_gclid}","required":false,"description":"The Google click ID (gclid) associated with this conversion. Leave blank to attribute via hashed email/phone instead."},{"key":"conversionDateTime","type":"string","label":"Conversion Date Time","secret":false,"default":"{formatDateTime(toDateTime(event.timestamp), '%Y-%m-%d %H:%i:%S')}+00:00","required":true,"description":"The date time at which the conversion occurred. Must be after the click time. The timezone must be specified. The format is \"yyyy-mm-dd hh:mm:ss+|-hh:mm\", e.g. \"2019-01-01 12:32:45-08:00\"."},{"key":"conversionValue","type":"string","label":"Conversion value","secret":false,"default":"","required":false,"description":"The value of the conversion for the advertiser."},{"key":"currencyCode","type":"string","label":"Currency code","secret":false,"default":"","required":false,"description":"Currency associated with the conversion value. This is the ISO 4217 3-character currency code. For example: USD, EUR."},{"key":"orderId","type":"string","label":"Order ID","secret":false,"default":"","required":false,"description":"The order ID associated with the conversion. An order id can only be used for one conversion per conversion action."},{"key":"email","type":"string","label":"Email address","secret":false,"default":"{person.properties.email}","required":false,"description":"Email address for enhanced conversions, used when no gclid is available. Sent SHA-256 hashed; leave blank to omit. Normalize (lowercase, trimmed) for best match rates."},{"key":"phone","type":"string","label":"Phone number","secret":false,"default":"","required":false,"description":"Phone number for enhanced conversions, used when no gclid is available. Sent SHA-256 hashed; leave blank to omit. Normalize to E.164 format (e.g. +14255551234) for best match rates."}]}]},{"id":"template-reddit-conversions-api","name":"Reddit Conversions API","description":"Track how many Reddit users interact with your website.","code":"if (empty(inputs.accountId) or empty(inputs.conversionsAccessToken)) {\n    throw Error('Account ID and access token are required')\n}\n\nlet RDT_ALLOWED_EVENT_NAMES := [\n    'PageVisit',\n    'Search',\n    'AddToCart',\n    'AddToWishlist',\n    'Purchase',\n    'ViewContent',\n    'Lead',\n    'SignUp',\n    'Custom',\n];\n\nlet eventProperties := {};\nfor (let key, value in inputs.eventProperties) {\n    if (not empty(value)) {\n        eventProperties[key] := value;\n    }\n}\n\nlet userProperties := {};\nfor (let key, value in inputs.userProperties) {\n    if (not empty(value)) {\n        userProperties[key] := value;\n    }\n}\n\nlet eventType := {'tracking_type': inputs.eventType};\nif (not has(RDT_ALLOWED_EVENT_NAMES, inputs.eventType)) {\n    eventType.tracking_type := 'Custom';\n    eventType.custom_event_name := inputs.eventType;\n}\n\nlet eventData := {\n    'event_at': event.timestamp,\n    'event_type': eventType,\n    'user': userProperties,\n    'event_metadata': eventProperties,\n};\n\nif (not empty(inputs.rdt_cid)) {\n    eventData['click_id'] := inputs.rdt_cid;\n}\n\nlet events := [eventData];\n\nlet body := {\n    'test_mode': false,\n    'events': events,\n};\n\nlet url := f'https://ads-api.reddit.com/api/v2.0/conversions/events/{inputs.accountId}';\nlet userAgent := 'hog:com.posthog.cdp:0.0.1 (by /u/PostHogTeam)';\nlet headers := {\n        'Content-Type': 'application/json',\n        'Authorization': f'Bearer {inputs.conversionsAccessToken}',\n        'User-Agent': userAgent,\n    };\n\nlet res := fetch(url, {\n    'method': 'POST',\n    'headers': headers,\n    'body': body,\n});\nif (res.status >= 400) {\n    throw Error(f'Error from https://ads-api.reddit.com (status {res.status}): {res.body}')\n}","code_language":"hog","inputs_schema":[{"key":"accountId","type":"string","label":"Reddit Ads account ID","secret":false,"default":"","required":true,"description":"The ID of the Reddit Ads account that the conversion event belongs to. Your account ID may or may not contain the t2_ prefix."},{"key":"conversionsAccessToken","type":"string","label":"Conversion Access Token","secret":true,"default":"","required":true,"description":"You must obtain a Conversion Access Token."},{"key":"userProperties","type":"dictionary","label":"User parameters","secret":false,"default":{"ip":"{sha256Hex(event.properties.$ip)}","email":"{person.properties.email}","user_agent":"{person.properties.$raw_user_agent}","screen_dimensions":"{{'width': person.properties.$screen_width, 'height': person.properties.$screen_height}}"},"required":false,"description":"Map of Reddit user parameters and their values. Check out this page for more details: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel"}],"type":"destination","status":"alpha","category":["Advertisement"],"free":false,"icon_url":"/static/services/reddit.png","filters":null,"masking":null,"mapping_templates":[{"name":"Page Visit","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"$pageview","name":"Pageview","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"PageVisit","required":true,"description":"Check out this page for possible event types: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel"},{"key":"rdt_cid","type":"string","label":"Reddit Click ID (rdt_cid)","secret":false,"default":"{person.properties.rdt_cid ?? person.properties.$initial_rdt_cid}","required":false,"description":"The Reddit click ID (rdt_cid) associated with this conversion."},{"key":"eventProperties","type":"dictionary","label":"Event parameters","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","currency":"{event.properties.currency}","products":"{event.properties.products ? arrayMap(product -> ({'id': product.product_id, 'category': product.category, 'name': product.name}), event.properties.products) : event.properties.product_id ? [{'id': event.properties.product_id, 'category': event.properties.category, 'name': event.properties.name}] : null}","conversion_id":"{event.uuid}"},"required":false,"description":"Map of Reddit event attributes and their values. Check out these pages for more details: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel and https://business.reddithelp.com/s/article/about-event-metadata"}]},{"name":"Search","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Products Searched","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"Search","required":true,"description":"Check out this page for possible event types: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel"},{"key":"rdt_cid","type":"string","label":"Reddit Click ID (rdt_cid)","secret":false,"default":"{person.properties.rdt_cid ?? person.properties.$initial_rdt_cid}","required":false,"description":"The Reddit click ID (rdt_cid) associated with this conversion."},{"key":"eventProperties","type":"dictionary","label":"Event parameters","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","currency":"{event.properties.currency}","products":"{event.properties.products ? arrayMap(product -> ({'id': product.product_id, 'category': product.category, 'name': product.name}), event.properties.products) : event.properties.product_id ? [{'id': event.properties.product_id, 'category': event.properties.category, 'name': event.properties.name}] : null}","conversion_id":"{event.uuid}"},"required":false,"description":"Map of Reddit event attributes and their values. Check out these pages for more details: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel and https://business.reddithelp.com/s/article/about-event-metadata"}]},{"name":"Product Added","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Added","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"AddToCart","required":true,"description":"Check out this page for possible event types: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel"},{"key":"rdt_cid","type":"string","label":"Reddit Click ID (rdt_cid)","secret":false,"default":"{person.properties.rdt_cid ?? person.properties.$initial_rdt_cid}","required":false,"description":"The Reddit click ID (rdt_cid) associated with this conversion."},{"key":"eventProperties","type":"dictionary","label":"Event parameters","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","currency":"{event.properties.currency}","products":"{event.properties.products ? arrayMap(product -> ({'id': product.product_id, 'category': product.category, 'name': product.name}), event.properties.products) : event.properties.product_id ? [{'id': event.properties.product_id, 'category': event.properties.category, 'name': event.properties.name}] : null}","conversion_id":"{event.uuid}"},"required":false,"description":"Map of Reddit event attributes and their values. Check out these pages for more details: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel and https://business.reddithelp.com/s/article/about-event-metadata"}]},{"name":"Product Added to Wishlist","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Added to Wishlist","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"AddToWishlist","required":true,"description":"Check out this page for possible event types: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel"},{"key":"rdt_cid","type":"string","label":"Reddit Click ID (rdt_cid)","secret":false,"default":"{person.properties.rdt_cid ?? person.properties.$initial_rdt_cid}","required":false,"description":"The Reddit click ID (rdt_cid) associated with this conversion."},{"key":"eventProperties","type":"dictionary","label":"Event parameters","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","currency":"{event.properties.currency}","products":"{event.properties.products ? arrayMap(product -> ({'id': product.product_id, 'category': product.category, 'name': product.name}), event.properties.products) : event.properties.product_id ? [{'id': event.properties.product_id, 'category': event.properties.category, 'name': event.properties.name}] : null}","conversion_id":"{event.uuid}"},"required":false,"description":"Map of Reddit event attributes and their values. Check out these pages for more details: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel and https://business.reddithelp.com/s/article/about-event-metadata"}]},{"name":"Order Completed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Order Completed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"Purchase","required":true,"description":"Check out this page for possible event types: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel"},{"key":"rdt_cid","type":"string","label":"Reddit Click ID (rdt_cid)","secret":false,"default":"{person.properties.rdt_cid ?? person.properties.$initial_rdt_cid}","required":false,"description":"The Reddit click ID (rdt_cid) associated with this conversion."},{"key":"eventProperties","type":"dictionary","label":"Event parameters","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","currency":"{event.properties.currency}","products":"{event.properties.products ? arrayMap(product -> ({'id': product.product_id, 'category': product.category, 'name': product.name}), event.properties.products) : event.properties.product_id ? [{'id': event.properties.product_id, 'category': event.properties.category, 'name': event.properties.name}] : null}","conversion_id":"{event.uuid}"},"required":false,"description":"Map of Reddit event attributes and their values. Check out these pages for more details: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel and https://business.reddithelp.com/s/article/about-event-metadata"}]},{"name":"Product Viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Viewed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"ViewContent","required":true,"description":"Check out this page for possible event types: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel"},{"key":"rdt_cid","type":"string","label":"Reddit Click ID (rdt_cid)","secret":false,"default":"{person.properties.rdt_cid ?? person.properties.$initial_rdt_cid}","required":false,"description":"The Reddit click ID (rdt_cid) associated with this conversion."},{"key":"eventProperties","type":"dictionary","label":"Event parameters","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","currency":"{event.properties.currency}","products":"{event.properties.products ? arrayMap(product -> ({'id': product.product_id, 'category': product.category, 'name': product.name}), event.properties.products) : event.properties.product_id ? [{'id': event.properties.product_id, 'category': event.properties.category, 'name': event.properties.name}] : null}","conversion_id":"{event.uuid}"},"required":false,"description":"Map of Reddit event attributes and their values. Check out these pages for more details: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel and https://business.reddithelp.com/s/article/about-event-metadata"}]},{"name":"Lead Generated","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Lead Generated","type":"events"}],"bytecode":["_H",1,32,"Lead Generated",32,"event",1,1,11,3,1,4,1]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"Lead","required":true,"description":"Check out this page for possible event types: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel"},{"key":"rdt_cid","type":"string","label":"Reddit Click ID (rdt_cid)","secret":false,"default":"{person.properties.rdt_cid ?? person.properties.$initial_rdt_cid}","required":false,"description":"The Reddit click ID (rdt_cid) associated with this conversion."},{"key":"eventProperties","type":"dictionary","label":"Event parameters","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","currency":"{event.properties.currency}","products":"{event.properties.products ? arrayMap(product -> ({'id': product.product_id, 'category': product.category, 'name': product.name}), event.properties.products) : event.properties.product_id ? [{'id': event.properties.product_id, 'category': event.properties.category, 'name': event.properties.name}] : null}","conversion_id":"{event.uuid}"},"required":false,"description":"Map of Reddit event attributes and their values. Check out these pages for more details: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel and https://business.reddithelp.com/s/article/about-event-metadata"}]},{"name":"Signed Up","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Signed Up","type":"events"}],"bytecode":["_H",1,32,"Signed Up",32,"event",1,1,11,3,1,4,1]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"SignUp","required":true,"description":"Check out this page for possible event types: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel"},{"key":"rdt_cid","type":"string","label":"Reddit Click ID (rdt_cid)","secret":false,"default":"{person.properties.rdt_cid ?? person.properties.$initial_rdt_cid}","required":false,"description":"The Reddit click ID (rdt_cid) associated with this conversion."},{"key":"eventProperties","type":"dictionary","label":"Event parameters","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","currency":"{event.properties.currency}","products":"{event.properties.products ? arrayMap(product -> ({'id': product.product_id, 'category': product.category, 'name': product.name}), event.properties.products) : event.properties.product_id ? [{'id': event.properties.product_id, 'category': event.properties.category, 'name': event.properties.name}] : null}","conversion_id":"{event.uuid}"},"required":false,"description":"Map of Reddit event attributes and their values. Check out these pages for more details: https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel and https://business.reddithelp.com/s/article/about-event-metadata"}]}]},{"id":"template-linkedin-ads","name":"LinkedIn Ads Conversions","description":"Send conversion events to LinkedIn Ads","code":"let body := {\n    'conversion': f'urn:lla:llaPartnerConversion:{inputs.conversionRuleId}',\n    'conversionHappenedAt': inputs.conversionDateTime,\n    'user': {\n        'userIds': []\n     },\n    'eventId' : inputs.eventId\n}\n\nif (not empty(inputs.conversionValue) or not empty(inputs.currencyCode)) {\n    body.conversionValue := {}\n}\nif (not empty(inputs.currencyCode)) {\n    body.conversionValue.currencyCode := inputs.currencyCode\n}\nif (not empty(inputs.conversionValue)) {\n    body.conversionValue.amount := inputs.conversionValue\n}\n\nlet userInfo := {}\nfor (let key, value in inputs.userInfo) {\n    if (not empty(value)) {\n        userInfo[key] := value\n    }\n}\n// LinkedIn requires firstName and lastName within userInfo and rejects a partial object with a 422,\n// so send userInfo only when both are present and fall back to matching on userIds alone.\nif (not empty(userInfo['firstName']) and not empty(userInfo['lastName'])) {\n    body.user['userInfo'] := userInfo\n}\n\nfor (let key, value in inputs.userIds) {\n    if (not empty(value)) {\n        body.user.userIds := arrayPushBack(body.user.userIds, {'idType': key, 'idValue': value})\n    }\n}\n\nlet res := fetch('https://api.linkedin.com/rest/conversionEvents', {\n    'method': 'POST',\n    'headers': {\n        'Authorization': f'Bearer {inputs.oauth.access_token}',\n        'Content-Type': 'application/json',\n        'LinkedIn-Version': '202607'\n    },\n    'body': body\n})\n\nif (res.status >= 400) {\n    throw Error(f'Error from api.linkedin.com (status {res.status}): {res.body}')\n}","code_language":"hog","inputs_schema":[{"key":"oauth","type":"integration","label":"LinkedIn Ads account","secret":false,"required":true,"integration":"linkedin-ads"},{"key":"accountId","type":"integration_field","label":"Account ID","secret":false,"required":true,"description":"ID of your LinkedIn Ads Account. This should be 9-digits and in XXXXXXXXX format.","integration_key":"oauth","integration_field":"linkedin_ads_account_id"},{"key":"conversionRuleId","type":"integration_field","label":"Conversion rule","secret":false,"required":true,"description":"The Conversion rule associated with this conversion.","requires_field":"accountId","integration_key":"oauth","integration_field":"linkedin_ads_conversion_rule_id"},{"key":"conversionDateTime","type":"string","label":"Conversion Date Time","secret":false,"default":"{toUnixTimestampMilli(event.timestamp)}","required":true,"description":"The timestamp at which the conversion occurred in milliseconds. Must be after the click time."},{"key":"conversionValue","type":"string","label":"Conversion value","secret":false,"default":"","required":false,"description":"The value of the conversion for the advertiser in decimal string. (e.g. “100.05”)."},{"key":"currencyCode","type":"string","label":"Currency code","secret":false,"default":"","required":false,"description":"Currency associated with the conversion value. This is the ISO 4217 3-character currency code. For example: USD, EUR."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"ID of the event that triggered the conversion."},{"key":"userIds","type":"dictionary","label":"User ids","secret":false,"default":{"SHA256_EMAIL":"{sha256Hex(person.properties.email)}","LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID":"{person.properties.li_fat_id ?? person.properties.$initial_li_fat_id}"},"required":true,"description":"A map that contains user ids. See this page for options: https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/conversions-api?view=li-lms-2024-03&tabs=curl#idtype"},{"key":"userInfo","type":"dictionary","label":"User information","secret":false,"default":{"title":"{person.properties.title}","lastName":"{person.properties.last_name}","firstName":"{person.properties.first_name}","companyName":"{person.properties.company}","countryCode":"{person.properties.$geoip_country_code}"},"required":true,"description":"A map that contains user information data. See this page for options: https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/conversions-api?view=li-lms-2024-03&tabs=curl#userinfo"}],"type":"destination","status":"alpha","category":["Advertisement"],"free":false,"icon_url":"/static/services/linkedin.png","filters":{"events":[],"actions":[],"filter_test_accounts":true},"masking":null,"mapping_templates":null},{"id":"template-tiktok-ads","name":"TikTok Ads Conversions","description":"Send conversion events to TikTok Ads","code":"if (empty(inputs.pixelId) or empty(inputs.accessToken)) {\n    throw Error('Pixel ID and access token are required')\n}\n\nlet body := {\n    'event_source': 'web',\n    'event_source_id': inputs.pixelId,\n    'data': [\n        {\n            'event': inputs.eventName,\n            'event_time': inputs.eventTimestamp,\n            'event_id': inputs.eventId,\n            'user': {},\n            'properties': {},\n            'page': {}\n        }\n    ]\n}\n\nif (not empty(inputs.testEventCode)) {\n    body.test_event_code := inputs.testEventCode\n}\n\nfor (let key, value in inputs.userProperties) {\n    if (not empty(value) or value == '') {\n        body.data.1.user[key] := value\n    }\n}\n\nfor (let key, value in inputs.propertyProperties) {\n    if (not empty(value)) {\n        body.data.1.properties[key] := value\n    }\n}\n\nfor (let key, value in inputs.pageProperties) {\n    if (not empty(value)) {\n        body.data.1.page[key] := value\n    }\n}\n\nlet res := fetch(f'https://business-api.tiktok.com/open_api/v1.3/event/track/', {\n    'method': 'POST',\n    'headers': {\n        'Content-Type': 'application/json',\n        'Access-Token': inputs.accessToken\n    },\n    'body': body\n})\nif (res.status >= 400) {\n    throw Error(f'Error from business-api.tiktok.com (status {res.status}): {res.body}')\n}","code_language":"hog","inputs_schema":[{"key":"accessToken","type":"string","label":"Access token","secret":true,"required":true,"description":"Check out this page on how to obtain such a token: https://business-api.tiktok.com/portal/docs?id=1771101027431425"},{"key":"pixelId","type":"string","label":"Pixel ID","secret":false,"required":true,"description":"You must obtain a Pixel ID to use the Conversions API. If you've already set up a Pixel for your website, we recommend that you use the same Pixel ID for your browser and server events."},{"key":"userProperties","type":"dictionary","label":"User properties","secret":false,"default":{"ip":"{event.properties.$ip}","city":"{not empty(person.properties.$geoip_city_name) ? replaceAll(lower(person.properties.$geoip_city_name), ' ', '') : null}","email":"{not empty(person.properties.email) ? sha256Hex(lower(person.properties.email)) : ''}","phone":"{not empty(person.properties.phone) ? sha256Hex(person.properties.phone) : ''}","state":"{lower(person.properties.$geoip_subdivision_1_code)}","ttclid":"{person.properties.ttclid ?? person.properties.$initial_ttclid}","country":"{lower(person.properties.$geoip_country_code)}","zip_code":"{not empty (person.properties.$geoip_postal_code) ? sha256Hex(replaceAll(lower(person.properties.$geoip_postal_code), ' ', '')) : null}","last_name":"{not empty(person.properties.last_name) ? sha256Hex(lower(person.properties.last_name)) : ''}","first_name":"{not empty(person.properties.first_name) ? sha256Hex(lower(person.properties.first_name)) : ''}","user_agent":"{event.properties.$raw_user_agent}","external_id":"{not empty(person.id) ? sha256Hex(person.id) : ''}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-user%20parameters"},{"key":"testEventCode","type":"string","label":"Test Event Code","secret":false,"default":"","required":false,"description":"Use this field to specify that events should be test events rather than actual traffic. You'll want to remove your Test Event Code when sending real traffic through this integration."}],"type":"destination","status":"alpha","category":["Advertisement"],"free":false,"icon_url":"/static/services/tiktok.png","filters":null,"masking":null,"mapping_templates":[{"name":"Page Viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"$pageview","name":"Pageview","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"Pageview","required":true,"description":"A standard event or custom event name."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event."},{"key":"eventTimestamp","type":"string","label":"Event timestamp","secret":false,"default":"{toUnixTimestamp(event.timestamp)}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred."},{"key":"propertyProperties","type":"dictionary","label":"Property properties","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","shop_id":"{event.properties.shop_id}","contents":"{(not empty(event.properties.sku) and not empty(event.properties.price) and not empty(event.properties.category) and not empty(event.properties.name) and not empty(event.properties.brand) ? [{'price': event.properties.price, 'content_id': event.properties.sku, 'content_category': event.properties.category, 'content_name': event.properties.name, 'brand': event.properties.brand}] : [])}","currency":"{event.properties.currency ?? 'USD'}","order_id":"{event.properties.order_id}","num_items":"{event.properties.quantity}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : []}","description":"","content_type":"product","search_string":"{event.properties.query}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-properties%20parameters"},{"key":"pageProperties","type":"dictionary","label":"Page properties","secret":false,"default":{"url":"{event.properties.$current_url}","referrer":"{event.properties.$referrer}"},"required":true,"description":"A map that contains page information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-page%20parameters"}]},{"name":"Payment Info Entered","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Payment Info Entered","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"AddPaymentInfo","required":true,"description":"A standard event or custom event name."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event."},{"key":"eventTimestamp","type":"string","label":"Event timestamp","secret":false,"default":"{toUnixTimestamp(event.timestamp)}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred."},{"key":"propertyProperties","type":"dictionary","label":"Property properties","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","shop_id":"{event.properties.shop_id}","contents":"{(not empty(event.properties.sku) and not empty(event.properties.price) and not empty(event.properties.category) and not empty(event.properties.name) and not empty(event.properties.brand) ? [{'price': event.properties.price, 'content_id': event.properties.sku, 'content_category': event.properties.category, 'content_name': event.properties.name, 'brand': event.properties.brand}] : [])}","currency":"{event.properties.currency ?? 'USD'}","order_id":"{event.properties.order_id}","num_items":"{event.properties.quantity}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : []}","description":"","content_type":"product","search_string":"{event.properties.query}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-properties%20parameters"},{"key":"pageProperties","type":"dictionary","label":"Page properties","secret":false,"default":{"url":"{event.properties.$current_url}","referrer":"{event.properties.$referrer}"},"required":true,"description":"A map that contains page information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-page%20parameters"}]},{"name":"Product Added","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Added","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"AddToCart","required":true,"description":"A standard event or custom event name."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event."},{"key":"eventTimestamp","type":"string","label":"Event timestamp","secret":false,"default":"{toUnixTimestamp(event.timestamp)}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred."},{"key":"propertyProperties","type":"dictionary","label":"Property properties","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","shop_id":"{event.properties.shop_id}","contents":"{(not empty(event.properties.sku) and not empty(event.properties.price) and not empty(event.properties.category) and not empty(event.properties.name) and not empty(event.properties.brand) ? [{'price': event.properties.price, 'content_id': event.properties.sku, 'content_category': event.properties.category, 'content_name': event.properties.name, 'brand': event.properties.brand}] : [])}","currency":"{event.properties.currency ?? 'USD'}","order_id":"{event.properties.order_id}","num_items":"{event.properties.quantity}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : []}","description":"","content_type":"product","search_string":"{event.properties.query}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-properties%20parameters"},{"key":"pageProperties","type":"dictionary","label":"Page properties","secret":false,"default":{"url":"{event.properties.$current_url}","referrer":"{event.properties.$referrer}"},"required":true,"description":"A map that contains page information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-page%20parameters"}]},{"name":"Product Added to Wishlist","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Added to Wishlist","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"AddToWishlist","required":true,"description":"A standard event or custom event name."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event."},{"key":"eventTimestamp","type":"string","label":"Event timestamp","secret":false,"default":"{toUnixTimestamp(event.timestamp)}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred."},{"key":"propertyProperties","type":"dictionary","label":"Property properties","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","shop_id":"{event.properties.shop_id}","contents":"{(not empty(event.properties.sku) and not empty(event.properties.price) and not empty(event.properties.category) and not empty(event.properties.name) and not empty(event.properties.brand) ? [{'price': event.properties.price, 'content_id': event.properties.sku, 'content_category': event.properties.category, 'content_name': event.properties.name, 'brand': event.properties.brand}] : [])}","currency":"{event.properties.currency ?? 'USD'}","order_id":"{event.properties.order_id}","num_items":"{event.properties.quantity}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : []}","description":"","content_type":"product","search_string":"{event.properties.query}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-properties%20parameters"},{"key":"pageProperties","type":"dictionary","label":"Page properties","secret":false,"default":{"url":"{event.properties.$current_url}","referrer":"{event.properties.$referrer}"},"required":true,"description":"A map that contains page information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-page%20parameters"}]},{"name":"Product Clicked","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Clicked","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"ClickButton","required":true,"description":"A standard event or custom event name."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event."},{"key":"eventTimestamp","type":"string","label":"Event timestamp","secret":false,"default":"{toUnixTimestamp(event.timestamp)}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred."},{"key":"propertyProperties","type":"dictionary","label":"Property properties","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","shop_id":"{event.properties.shop_id}","contents":"{(not empty(event.properties.sku) and not empty(event.properties.price) and not empty(event.properties.category) and not empty(event.properties.name) and not empty(event.properties.brand) ? [{'price': event.properties.price, 'content_id': event.properties.sku, 'content_category': event.properties.category, 'content_name': event.properties.name, 'brand': event.properties.brand}] : [])}","currency":"{event.properties.currency ?? 'USD'}","order_id":"{event.properties.order_id}","num_items":"{event.properties.quantity}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : []}","description":"","content_type":"product","search_string":"{event.properties.query}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-properties%20parameters"},{"key":"pageProperties","type":"dictionary","label":"Page properties","secret":false,"default":{"url":"{event.properties.$current_url}","referrer":"{event.properties.$referrer}"},"required":true,"description":"A map that contains page information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-page%20parameters"}]},{"name":"Order Placed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Order Placed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"PlaceAnOrder","required":true,"description":"A standard event or custom event name."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event."},{"key":"eventTimestamp","type":"string","label":"Event timestamp","secret":false,"default":"{toUnixTimestamp(event.timestamp)}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred."},{"key":"propertyProperties","type":"dictionary","label":"Property properties","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","shop_id":"{event.properties.shop_id}","contents":"{arrayMap(x -> ({'price': x.price, 'content_id': x.sku, 'content_category': x.category, 'content_name': x.name, 'brand': x.brand}), event.properties.products ?? [])}","currency":"{event.properties.currency ?? 'USD'}","order_id":"{event.properties.order_id}","num_items":"{arrayReduce((acc, curr) -> acc + curr.quantity, event.properties.products ?? [], 0)}","content_ids":"{arrayMap(x -> x.sku, event.properties.products ?? [])}","description":"","content_type":"product","search_string":"{event.properties.query}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-properties%20parameters"},{"key":"pageProperties","type":"dictionary","label":"Page properties","secret":false,"default":{"url":"{event.properties.$current_url}","referrer":"{event.properties.$referrer}"},"required":true,"description":"A map that contains page information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-page%20parameters"}]},{"name":"Signed Up","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Signed Up","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"CompleteRegistration","required":true,"description":"A standard event or custom event name."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event."},{"key":"eventTimestamp","type":"string","label":"Event timestamp","secret":false,"default":"{toUnixTimestamp(event.timestamp)}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred."},{"key":"propertyProperties","type":"dictionary","label":"Property properties","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","shop_id":"{event.properties.shop_id}","contents":"{(not empty(event.properties.sku) and not empty(event.properties.price) and not empty(event.properties.category) and not empty(event.properties.name) and not empty(event.properties.brand) ? [{'price': event.properties.price, 'content_id': event.properties.sku, 'content_category': event.properties.category, 'content_name': event.properties.name, 'brand': event.properties.brand}] : [])}","currency":"{event.properties.currency ?? 'USD'}","order_id":"{event.properties.order_id}","num_items":"{event.properties.quantity}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : []}","description":"","content_type":"product","search_string":"{event.properties.query}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-properties%20parameters"},{"key":"pageProperties","type":"dictionary","label":"Page properties","secret":false,"default":{"url":"{event.properties.$current_url}","referrer":"{event.properties.$referrer}"},"required":true,"description":"A map that contains page information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-page%20parameters"}]},{"name":"Checkout Started","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Checkout Started","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"InitiateCheckout","required":true,"description":"A standard event or custom event name."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event."},{"key":"eventTimestamp","type":"string","label":"Event timestamp","secret":false,"default":"{toUnixTimestamp(event.timestamp)}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred."},{"key":"propertyProperties","type":"dictionary","label":"Property properties","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","shop_id":"{event.properties.shop_id}","contents":"{arrayMap(x -> ({'price': x.price, 'content_id': x.sku, 'content_category': x.category, 'content_name': x.name, 'brand': x.brand}), event.properties.products ?? [])}","currency":"{event.properties.currency ?? 'USD'}","order_id":"{event.properties.order_id}","num_items":"{arrayReduce((acc, curr) -> acc + curr.quantity, event.properties.products ?? [], 0)}","content_ids":"{arrayMap(x -> x.sku, event.properties.products ?? [])}","description":"","content_type":"product","search_string":"{event.properties.query}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-properties%20parameters"},{"key":"pageProperties","type":"dictionary","label":"Page properties","secret":false,"default":{"url":"{event.properties.$current_url}","referrer":"{event.properties.$referrer}"},"required":true,"description":"A map that contains page information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-page%20parameters"}]},{"name":"Order Completed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Order Completed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"CompletePayment","required":true,"description":"A standard event or custom event name."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event."},{"key":"eventTimestamp","type":"string","label":"Event timestamp","secret":false,"default":"{toUnixTimestamp(event.timestamp)}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred."},{"key":"propertyProperties","type":"dictionary","label":"Property properties","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","shop_id":"{event.properties.shop_id}","contents":"{arrayMap(x -> ({'price': x.price, 'content_id': x.sku, 'content_category': x.category, 'content_name': x.name, 'brand': x.brand}), event.properties.products ?? [])}","currency":"{event.properties.currency ?? 'USD'}","order_id":"{event.properties.order_id}","num_items":"{arrayReduce((acc, curr) -> acc + curr.quantity, event.properties.products ?? [], 0)}","content_ids":"{arrayMap(x -> x.sku, event.properties.products ?? [])}","description":"","content_type":"product","search_string":"{event.properties.query}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-properties%20parameters"},{"key":"pageProperties","type":"dictionary","label":"Page properties","secret":false,"default":{"url":"{event.properties.$current_url}","referrer":"{event.properties.$referrer}"},"required":true,"description":"A map that contains page information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-page%20parameters"}]},{"name":"Products Searched","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Products Searched","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"Search","required":true,"description":"A standard event or custom event name."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event."},{"key":"eventTimestamp","type":"string","label":"Event timestamp","secret":false,"default":"{toUnixTimestamp(event.timestamp)}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred."},{"key":"propertyProperties","type":"dictionary","label":"Property properties","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","shop_id":"{event.properties.shop_id}","contents":"{(not empty(event.properties.sku) and not empty(event.properties.price) and not empty(event.properties.category) and not empty(event.properties.name) and not empty(event.properties.brand) ? [{'price': event.properties.price, 'content_id': event.properties.sku, 'content_category': event.properties.category, 'content_name': event.properties.name, 'brand': event.properties.brand}] : [])}","currency":"{event.properties.currency ?? 'USD'}","order_id":"{event.properties.order_id}","num_items":"{event.properties.quantity}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : []}","description":"","content_type":"product","search_string":"{event.properties.query}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-properties%20parameters"},{"key":"pageProperties","type":"dictionary","label":"Page properties","secret":false,"default":{"url":"{event.properties.$current_url}","referrer":"{event.properties.$referrer}"},"required":true,"description":"A map that contains page information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-page%20parameters"}]},{"name":"Product Viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Viewed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"default":"ViewContent","required":true,"description":"A standard event or custom event name."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event."},{"key":"eventTimestamp","type":"string","label":"Event timestamp","secret":false,"default":"{toUnixTimestamp(event.timestamp)}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred."},{"key":"propertyProperties","type":"dictionary","label":"Property properties","secret":false,"default":{"value":"{toFloat(event.properties.value ?? event.properties.revenue ?? event.properties.price)}","shop_id":"{event.properties.shop_id}","contents":"{(not empty(event.properties.sku) and not empty(event.properties.price) and not empty(event.properties.category) and not empty(event.properties.name) and not empty(event.properties.brand) ? [{'price': event.properties.price, 'content_id': event.properties.sku, 'content_category': event.properties.category, 'content_name': event.properties.name, 'brand': event.properties.brand}] : [])}","currency":"{event.properties.currency ?? 'USD'}","order_id":"{event.properties.order_id}","num_items":"{event.properties.quantity}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : []}","description":"","content_type":"product","search_string":"{event.properties.query}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-properties%20parameters"},{"key":"pageProperties","type":"dictionary","label":"Page properties","secret":false,"default":{"url":"{event.properties.$current_url}","referrer":"{event.properties.$referrer}"},"required":true,"description":"A map that contains page information data. See this page for options: https://business-api.tiktok.com/portal/docs?id=1771101151059969#item-link-page%20parameters"}]}]},{"id":"template-openai-ads","name":"OpenAI Ads Conversions","description":"Send conversion events to the OpenAI Ads Conversions API to measure ads shown in ChatGPT","code":"let userData := {}\nif (not empty(inputs.obref)) {\n    userData.obref := inputs.obref\n}\nif (not empty(inputs.email)) {\n    userData.emails_sha256 := [sha256Hex(lower(trim(inputs.email)))]\n}\nif (not empty(inputs.externalId)) {\n    userData.external_ids_sha256 := [sha256Hex(trim(inputs.externalId))]\n}\n// OpenAI can only attribute a conversion that carries at least one strong identifier;\n// IP address and user agent alone are not enough\nif (empty(inputs.oppref) and length(keys(userData)) == 0) {\n    print('No `oppref`, `obref`, `email` or `externalId` to identify the user with. Skipping...')\n    return\n}\nif (not empty(inputs.ipAddress)) {\n    userData.ip_address := inputs.ipAddress\n}\nif (not empty(inputs.userAgent)) {\n    userData.user_agent := inputs.userAgent\n}\n\nlet conversion := {\n    'id': inputs.eventId,\n    'type': inputs.eventType,\n    'timestamp_ms': toInt(inputs.eventTime),\n    'action_source': inputs.actionSource\n}\nif (inputs.eventType == 'custom') {\n    if (empty(inputs.customEventName)) {\n        throw Error('`customEventName` is required when the event type is `custom`')\n    }\n    // OpenAI only accepts [a-z0-9_-]{1,64}; normalize the common offenders (spaces, capitals)\n    // so the {event.event} default works for typical PostHog event names\n    let customEventName := lower(replaceAll(trim(inputs.customEventName), ' ', '-'))\n    if (not match(customEventName, '^[a-z0-9_-]{1,64}$')) {\n        throw Error(f'`customEventName` `{customEventName}` is invalid: it must be 1-64 characters of lowercase letters, numbers, underscores, or dashes')\n    }\n    conversion.custom_event_name := customEventName\n}\nif ((inputs.eventType == 'app_installed' or inputs.eventType == 'app_opened') and inputs.actionSource != 'mobile_app') {\n    throw Error(f'`actionSource` must be `mobile_app` when the event type is `{inputs.eventType}`')\n}\nif (empty(inputs.sourceUrl)) {\n    if (inputs.actionSource == 'web') {\n        throw Error('`sourceUrl` is required when the action source is `web`')\n    }\n} else {\n    conversion.source_url := inputs.sourceUrl\n}\nif (not empty(inputs.oppref)) {\n    conversion.oppref := inputs.oppref\n}\nif (length(keys(userData)) > 0) {\n    conversion.user := userData\n}\n\nlet dataTypeByEventType := {'app_installed': 'customer_action', 'app_opened': 'customer_action', 'appointment_scheduled': 'customer_action', 'checkout_started': 'contents', 'contents_viewed': 'contents', 'custom': 'custom', 'items_added': 'contents', 'lead_created': 'customer_action', 'order_created': 'contents', 'page_viewed': 'contents', 'registration_completed': 'customer_action', 'subscription_created': 'plan_enrollment', 'trial_started': 'plan_enrollment'}\nlet data := {\n    'type': dataTypeByEventType[inputs.eventType]\n}\nif (not empty(inputs.amount)) {\n    if (empty(inputs.currency)) {\n        print('`amount` is set but `currency` is missing. Skipping both, as OpenAI requires a currency with every amount.')\n    } else {\n        data.amount := toInt(inputs.amount)\n        data.currency := inputs.currency\n    }\n}\nconversion.data := data\n\nlet res := fetch(f'https://bzr.openai.com/v1/events?pid={inputs.pixelId}', {\n    'method': 'POST',\n    'headers': {\n        'Authorization': f'Bearer {inputs.apiKey}',\n        'Content-Type': 'application/json'\n    },\n    'body': {\n        'events': [conversion]\n    }\n})\n\nif (res.status >= 400) {\n    throw Error(f'Error from bzr.openai.com (status {res.status}): {res.body}')\n}","code_language":"hog","inputs_schema":[{"key":"pixelId","type":"string","label":"Pixel ID","secret":false,"required":true,"description":"The ID of the OpenAI pixel that conversions are sent to. Find it in the conversions tab in OpenAI Ads Manager."},{"key":"apiKey","type":"string","label":"Conversions API key","secret":true,"required":true,"description":"The Conversions API key for your pixel, from the conversions tab in OpenAI Ads Manager."}],"type":"destination","status":"alpha","category":["Advertisement"],"free":false,"icon_url":"/static/services/openai_ads.svg","filters":null,"masking":null,"mapping_templates":[{"name":"Page viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"$pageview","name":"Pageview","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"choice","label":"Event type","secret":false,"choices":[{"label":"App installed","value":"app_installed"},{"label":"App opened","value":"app_opened"},{"label":"Appointment scheduled","value":"appointment_scheduled"},{"label":"Checkout started","value":"checkout_started"},{"label":"Contents viewed","value":"contents_viewed"},{"label":"Custom","value":"custom"},{"label":"Items added","value":"items_added"},{"label":"Lead created","value":"lead_created"},{"label":"Order created","value":"order_created"},{"label":"Page viewed","value":"page_viewed"},{"label":"Registration completed","value":"registration_completed"},{"label":"Subscription created","value":"subscription_created"},{"label":"Trial started","value":"trial_started"}],"default":"page_viewed","required":true,"description":"The OpenAI standard event type this conversion maps to. Pick \"Custom\" to send a custom conversion event."},{"key":"customEventName","type":"string","label":"Custom event name","secret":false,"default":"{event.event}","required":false,"description":"The event name sent when the event type is \"Custom\". Spaces are replaced with dashes and uppercase letters are lowercased. The result must be 1-64 characters of lowercase letters, numbers, underscores, or dashes, and must match the custom event configured in OpenAI Ads Manager."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"A unique ID for the event, used for deduplication against events sent by the OpenAI pixel."},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{toInt(toUnixTimestamp(event.timestamp) * 1000)}","required":true,"description":"The time the event occurred, as a UNIX timestamp in milliseconds (UTC). Must be within the last 7 days."},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"Web","value":"web"},{"label":"Mobile app","value":"mobile_app"},{"label":"Offline","value":"offline"},{"label":"Physical store","value":"physical_store"},{"label":"Phone call","value":"phone_call"},{"label":"Email","value":"email"},{"label":"Other","value":"other"}],"default":"web","required":true,"description":"Where the conversion happened. Must be \"Mobile app\" for the app installed and app opened event types."},{"key":"sourceUrl","type":"string","label":"Source URL","secret":false,"default":"{event.properties.$current_url}","required":false,"description":"The URL the conversion happened on. Required when the action source is \"Web\"."},{"key":"oppref","type":"string","label":"OpenAI click identifier (oppref)","secret":false,"default":"{event.properties.oppref ?? person.properties.oppref ?? person.properties.$initial_oppref}","required":false,"description":"The privacy-preserving identifier (oppref) OpenAI appends to ad click-through URLs. PostHog does not capture it automatically, so send it as an event or person property yourself. It gives the most accurate attribution, but conversions can also match on the obref cookie, hashed email, or hashed external ID when it is not available."},{"key":"obref","type":"string","label":"OpenAI browser identifier (obref)","secret":false,"default":"{person.properties.$obref}","required":false,"description":"The value of the __obref first-party cookie set by the OpenAI pixel, sent unhashed. PostHog does not read the cookie automatically, so send it as a person property yourself. Only send it for users who have consented to measurement."},{"key":"email","type":"string","label":"Email address","secret":false,"default":"{person.properties.email}","required":false,"description":"Email address for conversion matching. Sent SHA-256 hashed; leave blank to omit. Normalize (lowercase, trimmed) for best match rates."},{"key":"externalId","type":"string","label":"External ID","secret":false,"default":"{person.properties.external_id}","required":false,"description":"A stable pseudonymous customer ID for conversion matching. Sent SHA-256 hashed; leave blank to omit. Do not use raw emails or phone numbers here."},{"key":"ipAddress","type":"string","label":"IP address","secret":false,"default":"{event.properties.$ip}","required":false,"description":"The IP address of the user, used to improve conversion matching."},{"key":"userAgent","type":"string","label":"User agent","secret":false,"default":"{event.properties.$raw_user_agent}","required":false,"description":"The user agent of the browser the conversion happened in."},{"key":"amount","type":"string","label":"Amount (minor currency units)","secret":false,"default":"","required":false,"description":"The monetary value of the conversion as an integer in ISO 4217 minor units, e.g. 2599 for $25.99. Note this differs from most PostHog revenue properties, which are in major units."},{"key":"currency","type":"string","label":"Currency code","secret":false,"default":"","required":false,"description":"Currency of the amount as an ISO 4217 3-character code, e.g. USD, EUR. Required by OpenAI whenever an amount is sent."}]},{"name":"Order created","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Order Completed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"choice","label":"Event type","secret":false,"choices":[{"label":"App installed","value":"app_installed"},{"label":"App opened","value":"app_opened"},{"label":"Appointment scheduled","value":"appointment_scheduled"},{"label":"Checkout started","value":"checkout_started"},{"label":"Contents viewed","value":"contents_viewed"},{"label":"Custom","value":"custom"},{"label":"Items added","value":"items_added"},{"label":"Lead created","value":"lead_created"},{"label":"Order created","value":"order_created"},{"label":"Page viewed","value":"page_viewed"},{"label":"Registration completed","value":"registration_completed"},{"label":"Subscription created","value":"subscription_created"},{"label":"Trial started","value":"trial_started"}],"default":"order_created","required":true,"description":"The OpenAI standard event type this conversion maps to. Pick \"Custom\" to send a custom conversion event."},{"key":"customEventName","type":"string","label":"Custom event name","secret":false,"default":"{event.event}","required":false,"description":"The event name sent when the event type is \"Custom\". Spaces are replaced with dashes and uppercase letters are lowercased. The result must be 1-64 characters of lowercase letters, numbers, underscores, or dashes, and must match the custom event configured in OpenAI Ads Manager."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"A unique ID for the event, used for deduplication against events sent by the OpenAI pixel."},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{toInt(toUnixTimestamp(event.timestamp) * 1000)}","required":true,"description":"The time the event occurred, as a UNIX timestamp in milliseconds (UTC). Must be within the last 7 days."},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"Web","value":"web"},{"label":"Mobile app","value":"mobile_app"},{"label":"Offline","value":"offline"},{"label":"Physical store","value":"physical_store"},{"label":"Phone call","value":"phone_call"},{"label":"Email","value":"email"},{"label":"Other","value":"other"}],"default":"web","required":true,"description":"Where the conversion happened. Must be \"Mobile app\" for the app installed and app opened event types."},{"key":"sourceUrl","type":"string","label":"Source URL","secret":false,"default":"{event.properties.$current_url}","required":false,"description":"The URL the conversion happened on. Required when the action source is \"Web\"."},{"key":"oppref","type":"string","label":"OpenAI click identifier (oppref)","secret":false,"default":"{event.properties.oppref ?? person.properties.oppref ?? person.properties.$initial_oppref}","required":false,"description":"The privacy-preserving identifier (oppref) OpenAI appends to ad click-through URLs. PostHog does not capture it automatically, so send it as an event or person property yourself. It gives the most accurate attribution, but conversions can also match on the obref cookie, hashed email, or hashed external ID when it is not available."},{"key":"obref","type":"string","label":"OpenAI browser identifier (obref)","secret":false,"default":"{person.properties.$obref}","required":false,"description":"The value of the __obref first-party cookie set by the OpenAI pixel, sent unhashed. PostHog does not read the cookie automatically, so send it as a person property yourself. Only send it for users who have consented to measurement."},{"key":"email","type":"string","label":"Email address","secret":false,"default":"{person.properties.email}","required":false,"description":"Email address for conversion matching. Sent SHA-256 hashed; leave blank to omit. Normalize (lowercase, trimmed) for best match rates."},{"key":"externalId","type":"string","label":"External ID","secret":false,"default":"{person.properties.external_id}","required":false,"description":"A stable pseudonymous customer ID for conversion matching. Sent SHA-256 hashed; leave blank to omit. Do not use raw emails or phone numbers here."},{"key":"ipAddress","type":"string","label":"IP address","secret":false,"default":"{event.properties.$ip}","required":false,"description":"The IP address of the user, used to improve conversion matching."},{"key":"userAgent","type":"string","label":"User agent","secret":false,"default":"{event.properties.$raw_user_agent}","required":false,"description":"The user agent of the browser the conversion happened in."},{"key":"amount","type":"string","label":"Amount (minor currency units)","secret":false,"default":"","required":false,"description":"The monetary value of the conversion as an integer in ISO 4217 minor units, e.g. 2599 for $25.99. Note this differs from most PostHog revenue properties, which are in major units."},{"key":"currency","type":"string","label":"Currency code","secret":false,"default":"","required":false,"description":"Currency of the amount as an ISO 4217 3-character code, e.g. USD, EUR. Required by OpenAI whenever an amount is sent."}]},{"name":"Checkout started","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Checkout Started","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"choice","label":"Event type","secret":false,"choices":[{"label":"App installed","value":"app_installed"},{"label":"App opened","value":"app_opened"},{"label":"Appointment scheduled","value":"appointment_scheduled"},{"label":"Checkout started","value":"checkout_started"},{"label":"Contents viewed","value":"contents_viewed"},{"label":"Custom","value":"custom"},{"label":"Items added","value":"items_added"},{"label":"Lead created","value":"lead_created"},{"label":"Order created","value":"order_created"},{"label":"Page viewed","value":"page_viewed"},{"label":"Registration completed","value":"registration_completed"},{"label":"Subscription created","value":"subscription_created"},{"label":"Trial started","value":"trial_started"}],"default":"checkout_started","required":true,"description":"The OpenAI standard event type this conversion maps to. Pick \"Custom\" to send a custom conversion event."},{"key":"customEventName","type":"string","label":"Custom event name","secret":false,"default":"{event.event}","required":false,"description":"The event name sent when the event type is \"Custom\". Spaces are replaced with dashes and uppercase letters are lowercased. The result must be 1-64 characters of lowercase letters, numbers, underscores, or dashes, and must match the custom event configured in OpenAI Ads Manager."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"A unique ID for the event, used for deduplication against events sent by the OpenAI pixel."},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{toInt(toUnixTimestamp(event.timestamp) * 1000)}","required":true,"description":"The time the event occurred, as a UNIX timestamp in milliseconds (UTC). Must be within the last 7 days."},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"Web","value":"web"},{"label":"Mobile app","value":"mobile_app"},{"label":"Offline","value":"offline"},{"label":"Physical store","value":"physical_store"},{"label":"Phone call","value":"phone_call"},{"label":"Email","value":"email"},{"label":"Other","value":"other"}],"default":"web","required":true,"description":"Where the conversion happened. Must be \"Mobile app\" for the app installed and app opened event types."},{"key":"sourceUrl","type":"string","label":"Source URL","secret":false,"default":"{event.properties.$current_url}","required":false,"description":"The URL the conversion happened on. Required when the action source is \"Web\"."},{"key":"oppref","type":"string","label":"OpenAI click identifier (oppref)","secret":false,"default":"{event.properties.oppref ?? person.properties.oppref ?? person.properties.$initial_oppref}","required":false,"description":"The privacy-preserving identifier (oppref) OpenAI appends to ad click-through URLs. PostHog does not capture it automatically, so send it as an event or person property yourself. It gives the most accurate attribution, but conversions can also match on the obref cookie, hashed email, or hashed external ID when it is not available."},{"key":"obref","type":"string","label":"OpenAI browser identifier (obref)","secret":false,"default":"{person.properties.$obref}","required":false,"description":"The value of the __obref first-party cookie set by the OpenAI pixel, sent unhashed. PostHog does not read the cookie automatically, so send it as a person property yourself. Only send it for users who have consented to measurement."},{"key":"email","type":"string","label":"Email address","secret":false,"default":"{person.properties.email}","required":false,"description":"Email address for conversion matching. Sent SHA-256 hashed; leave blank to omit. Normalize (lowercase, trimmed) for best match rates."},{"key":"externalId","type":"string","label":"External ID","secret":false,"default":"{person.properties.external_id}","required":false,"description":"A stable pseudonymous customer ID for conversion matching. Sent SHA-256 hashed; leave blank to omit. Do not use raw emails or phone numbers here."},{"key":"ipAddress","type":"string","label":"IP address","secret":false,"default":"{event.properties.$ip}","required":false,"description":"The IP address of the user, used to improve conversion matching."},{"key":"userAgent","type":"string","label":"User agent","secret":false,"default":"{event.properties.$raw_user_agent}","required":false,"description":"The user agent of the browser the conversion happened in."},{"key":"amount","type":"string","label":"Amount (minor currency units)","secret":false,"default":"","required":false,"description":"The monetary value of the conversion as an integer in ISO 4217 minor units, e.g. 2599 for $25.99. Note this differs from most PostHog revenue properties, which are in major units."},{"key":"currency","type":"string","label":"Currency code","secret":false,"default":"","required":false,"description":"Currency of the amount as an ISO 4217 3-character code, e.g. USD, EUR. Required by OpenAI whenever an amount is sent."}]},{"name":"Items added","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Added","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"choice","label":"Event type","secret":false,"choices":[{"label":"App installed","value":"app_installed"},{"label":"App opened","value":"app_opened"},{"label":"Appointment scheduled","value":"appointment_scheduled"},{"label":"Checkout started","value":"checkout_started"},{"label":"Contents viewed","value":"contents_viewed"},{"label":"Custom","value":"custom"},{"label":"Items added","value":"items_added"},{"label":"Lead created","value":"lead_created"},{"label":"Order created","value":"order_created"},{"label":"Page viewed","value":"page_viewed"},{"label":"Registration completed","value":"registration_completed"},{"label":"Subscription created","value":"subscription_created"},{"label":"Trial started","value":"trial_started"}],"default":"items_added","required":true,"description":"The OpenAI standard event type this conversion maps to. Pick \"Custom\" to send a custom conversion event."},{"key":"customEventName","type":"string","label":"Custom event name","secret":false,"default":"{event.event}","required":false,"description":"The event name sent when the event type is \"Custom\". Spaces are replaced with dashes and uppercase letters are lowercased. The result must be 1-64 characters of lowercase letters, numbers, underscores, or dashes, and must match the custom event configured in OpenAI Ads Manager."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"A unique ID for the event, used for deduplication against events sent by the OpenAI pixel."},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{toInt(toUnixTimestamp(event.timestamp) * 1000)}","required":true,"description":"The time the event occurred, as a UNIX timestamp in milliseconds (UTC). Must be within the last 7 days."},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"Web","value":"web"},{"label":"Mobile app","value":"mobile_app"},{"label":"Offline","value":"offline"},{"label":"Physical store","value":"physical_store"},{"label":"Phone call","value":"phone_call"},{"label":"Email","value":"email"},{"label":"Other","value":"other"}],"default":"web","required":true,"description":"Where the conversion happened. Must be \"Mobile app\" for the app installed and app opened event types."},{"key":"sourceUrl","type":"string","label":"Source URL","secret":false,"default":"{event.properties.$current_url}","required":false,"description":"The URL the conversion happened on. Required when the action source is \"Web\"."},{"key":"oppref","type":"string","label":"OpenAI click identifier (oppref)","secret":false,"default":"{event.properties.oppref ?? person.properties.oppref ?? person.properties.$initial_oppref}","required":false,"description":"The privacy-preserving identifier (oppref) OpenAI appends to ad click-through URLs. PostHog does not capture it automatically, so send it as an event or person property yourself. It gives the most accurate attribution, but conversions can also match on the obref cookie, hashed email, or hashed external ID when it is not available."},{"key":"obref","type":"string","label":"OpenAI browser identifier (obref)","secret":false,"default":"{person.properties.$obref}","required":false,"description":"The value of the __obref first-party cookie set by the OpenAI pixel, sent unhashed. PostHog does not read the cookie automatically, so send it as a person property yourself. Only send it for users who have consented to measurement."},{"key":"email","type":"string","label":"Email address","secret":false,"default":"{person.properties.email}","required":false,"description":"Email address for conversion matching. Sent SHA-256 hashed; leave blank to omit. Normalize (lowercase, trimmed) for best match rates."},{"key":"externalId","type":"string","label":"External ID","secret":false,"default":"{person.properties.external_id}","required":false,"description":"A stable pseudonymous customer ID for conversion matching. Sent SHA-256 hashed; leave blank to omit. Do not use raw emails or phone numbers here."},{"key":"ipAddress","type":"string","label":"IP address","secret":false,"default":"{event.properties.$ip}","required":false,"description":"The IP address of the user, used to improve conversion matching."},{"key":"userAgent","type":"string","label":"User agent","secret":false,"default":"{event.properties.$raw_user_agent}","required":false,"description":"The user agent of the browser the conversion happened in."},{"key":"amount","type":"string","label":"Amount (minor currency units)","secret":false,"default":"","required":false,"description":"The monetary value of the conversion as an integer in ISO 4217 minor units, e.g. 2599 for $25.99. Note this differs from most PostHog revenue properties, which are in major units."},{"key":"currency","type":"string","label":"Currency code","secret":false,"default":"","required":false,"description":"Currency of the amount as an ISO 4217 3-character code, e.g. USD, EUR. Required by OpenAI whenever an amount is sent."}]},{"name":"Contents viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Viewed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"choice","label":"Event type","secret":false,"choices":[{"label":"App installed","value":"app_installed"},{"label":"App opened","value":"app_opened"},{"label":"Appointment scheduled","value":"appointment_scheduled"},{"label":"Checkout started","value":"checkout_started"},{"label":"Contents viewed","value":"contents_viewed"},{"label":"Custom","value":"custom"},{"label":"Items added","value":"items_added"},{"label":"Lead created","value":"lead_created"},{"label":"Order created","value":"order_created"},{"label":"Page viewed","value":"page_viewed"},{"label":"Registration completed","value":"registration_completed"},{"label":"Subscription created","value":"subscription_created"},{"label":"Trial started","value":"trial_started"}],"default":"contents_viewed","required":true,"description":"The OpenAI standard event type this conversion maps to. Pick \"Custom\" to send a custom conversion event."},{"key":"customEventName","type":"string","label":"Custom event name","secret":false,"default":"{event.event}","required":false,"description":"The event name sent when the event type is \"Custom\". Spaces are replaced with dashes and uppercase letters are lowercased. The result must be 1-64 characters of lowercase letters, numbers, underscores, or dashes, and must match the custom event configured in OpenAI Ads Manager."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"A unique ID for the event, used for deduplication against events sent by the OpenAI pixel."},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{toInt(toUnixTimestamp(event.timestamp) * 1000)}","required":true,"description":"The time the event occurred, as a UNIX timestamp in milliseconds (UTC). Must be within the last 7 days."},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"Web","value":"web"},{"label":"Mobile app","value":"mobile_app"},{"label":"Offline","value":"offline"},{"label":"Physical store","value":"physical_store"},{"label":"Phone call","value":"phone_call"},{"label":"Email","value":"email"},{"label":"Other","value":"other"}],"default":"web","required":true,"description":"Where the conversion happened. Must be \"Mobile app\" for the app installed and app opened event types."},{"key":"sourceUrl","type":"string","label":"Source URL","secret":false,"default":"{event.properties.$current_url}","required":false,"description":"The URL the conversion happened on. Required when the action source is \"Web\"."},{"key":"oppref","type":"string","label":"OpenAI click identifier (oppref)","secret":false,"default":"{event.properties.oppref ?? person.properties.oppref ?? person.properties.$initial_oppref}","required":false,"description":"The privacy-preserving identifier (oppref) OpenAI appends to ad click-through URLs. PostHog does not capture it automatically, so send it as an event or person property yourself. It gives the most accurate attribution, but conversions can also match on the obref cookie, hashed email, or hashed external ID when it is not available."},{"key":"obref","type":"string","label":"OpenAI browser identifier (obref)","secret":false,"default":"{person.properties.$obref}","required":false,"description":"The value of the __obref first-party cookie set by the OpenAI pixel, sent unhashed. PostHog does not read the cookie automatically, so send it as a person property yourself. Only send it for users who have consented to measurement."},{"key":"email","type":"string","label":"Email address","secret":false,"default":"{person.properties.email}","required":false,"description":"Email address for conversion matching. Sent SHA-256 hashed; leave blank to omit. Normalize (lowercase, trimmed) for best match rates."},{"key":"externalId","type":"string","label":"External ID","secret":false,"default":"{person.properties.external_id}","required":false,"description":"A stable pseudonymous customer ID for conversion matching. Sent SHA-256 hashed; leave blank to omit. Do not use raw emails or phone numbers here."},{"key":"ipAddress","type":"string","label":"IP address","secret":false,"default":"{event.properties.$ip}","required":false,"description":"The IP address of the user, used to improve conversion matching."},{"key":"userAgent","type":"string","label":"User agent","secret":false,"default":"{event.properties.$raw_user_agent}","required":false,"description":"The user agent of the browser the conversion happened in."},{"key":"amount","type":"string","label":"Amount (minor currency units)","secret":false,"default":"","required":false,"description":"The monetary value of the conversion as an integer in ISO 4217 minor units, e.g. 2599 for $25.99. Note this differs from most PostHog revenue properties, which are in major units."},{"key":"currency","type":"string","label":"Currency code","secret":false,"default":"","required":false,"description":"Currency of the amount as an ISO 4217 3-character code, e.g. USD, EUR. Required by OpenAI whenever an amount is sent."}]},{"name":"Registration completed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Signed Up","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"choice","label":"Event type","secret":false,"choices":[{"label":"App installed","value":"app_installed"},{"label":"App opened","value":"app_opened"},{"label":"Appointment scheduled","value":"appointment_scheduled"},{"label":"Checkout started","value":"checkout_started"},{"label":"Contents viewed","value":"contents_viewed"},{"label":"Custom","value":"custom"},{"label":"Items added","value":"items_added"},{"label":"Lead created","value":"lead_created"},{"label":"Order created","value":"order_created"},{"label":"Page viewed","value":"page_viewed"},{"label":"Registration completed","value":"registration_completed"},{"label":"Subscription created","value":"subscription_created"},{"label":"Trial started","value":"trial_started"}],"default":"registration_completed","required":true,"description":"The OpenAI standard event type this conversion maps to. Pick \"Custom\" to send a custom conversion event."},{"key":"customEventName","type":"string","label":"Custom event name","secret":false,"default":"{event.event}","required":false,"description":"The event name sent when the event type is \"Custom\". Spaces are replaced with dashes and uppercase letters are lowercased. The result must be 1-64 characters of lowercase letters, numbers, underscores, or dashes, and must match the custom event configured in OpenAI Ads Manager."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"A unique ID for the event, used for deduplication against events sent by the OpenAI pixel."},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{toInt(toUnixTimestamp(event.timestamp) * 1000)}","required":true,"description":"The time the event occurred, as a UNIX timestamp in milliseconds (UTC). Must be within the last 7 days."},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"Web","value":"web"},{"label":"Mobile app","value":"mobile_app"},{"label":"Offline","value":"offline"},{"label":"Physical store","value":"physical_store"},{"label":"Phone call","value":"phone_call"},{"label":"Email","value":"email"},{"label":"Other","value":"other"}],"default":"web","required":true,"description":"Where the conversion happened. Must be \"Mobile app\" for the app installed and app opened event types."},{"key":"sourceUrl","type":"string","label":"Source URL","secret":false,"default":"{event.properties.$current_url}","required":false,"description":"The URL the conversion happened on. Required when the action source is \"Web\"."},{"key":"oppref","type":"string","label":"OpenAI click identifier (oppref)","secret":false,"default":"{event.properties.oppref ?? person.properties.oppref ?? person.properties.$initial_oppref}","required":false,"description":"The privacy-preserving identifier (oppref) OpenAI appends to ad click-through URLs. PostHog does not capture it automatically, so send it as an event or person property yourself. It gives the most accurate attribution, but conversions can also match on the obref cookie, hashed email, or hashed external ID when it is not available."},{"key":"obref","type":"string","label":"OpenAI browser identifier (obref)","secret":false,"default":"{person.properties.$obref}","required":false,"description":"The value of the __obref first-party cookie set by the OpenAI pixel, sent unhashed. PostHog does not read the cookie automatically, so send it as a person property yourself. Only send it for users who have consented to measurement."},{"key":"email","type":"string","label":"Email address","secret":false,"default":"{person.properties.email}","required":false,"description":"Email address for conversion matching. Sent SHA-256 hashed; leave blank to omit. Normalize (lowercase, trimmed) for best match rates."},{"key":"externalId","type":"string","label":"External ID","secret":false,"default":"{person.properties.external_id}","required":false,"description":"A stable pseudonymous customer ID for conversion matching. Sent SHA-256 hashed; leave blank to omit. Do not use raw emails or phone numbers here."},{"key":"ipAddress","type":"string","label":"IP address","secret":false,"default":"{event.properties.$ip}","required":false,"description":"The IP address of the user, used to improve conversion matching."},{"key":"userAgent","type":"string","label":"User agent","secret":false,"default":"{event.properties.$raw_user_agent}","required":false,"description":"The user agent of the browser the conversion happened in."},{"key":"amount","type":"string","label":"Amount (minor currency units)","secret":false,"default":"","required":false,"description":"The monetary value of the conversion as an integer in ISO 4217 minor units, e.g. 2599 for $25.99. Note this differs from most PostHog revenue properties, which are in major units."},{"key":"currency","type":"string","label":"Currency code","secret":false,"default":"","required":false,"description":"Currency of the amount as an ISO 4217 3-character code, e.g. USD, EUR. Required by OpenAI whenever an amount is sent."}]},{"name":"App installed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Application Installed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"choice","label":"Event type","secret":false,"choices":[{"label":"App installed","value":"app_installed"},{"label":"App opened","value":"app_opened"},{"label":"Appointment scheduled","value":"appointment_scheduled"},{"label":"Checkout started","value":"checkout_started"},{"label":"Contents viewed","value":"contents_viewed"},{"label":"Custom","value":"custom"},{"label":"Items added","value":"items_added"},{"label":"Lead created","value":"lead_created"},{"label":"Order created","value":"order_created"},{"label":"Page viewed","value":"page_viewed"},{"label":"Registration completed","value":"registration_completed"},{"label":"Subscription created","value":"subscription_created"},{"label":"Trial started","value":"trial_started"}],"default":"app_installed","required":true,"description":"The OpenAI standard event type this conversion maps to. Pick \"Custom\" to send a custom conversion event."},{"key":"customEventName","type":"string","label":"Custom event name","secret":false,"default":"{event.event}","required":false,"description":"The event name sent when the event type is \"Custom\". Spaces are replaced with dashes and uppercase letters are lowercased. The result must be 1-64 characters of lowercase letters, numbers, underscores, or dashes, and must match the custom event configured in OpenAI Ads Manager."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"A unique ID for the event, used for deduplication against events sent by the OpenAI pixel."},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{toInt(toUnixTimestamp(event.timestamp) * 1000)}","required":true,"description":"The time the event occurred, as a UNIX timestamp in milliseconds (UTC). Must be within the last 7 days."},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"Web","value":"web"},{"label":"Mobile app","value":"mobile_app"},{"label":"Offline","value":"offline"},{"label":"Physical store","value":"physical_store"},{"label":"Phone call","value":"phone_call"},{"label":"Email","value":"email"},{"label":"Other","value":"other"}],"default":"mobile_app","required":true,"description":"Where the conversion happened. Must be \"Mobile app\" for the app installed and app opened event types."},{"key":"sourceUrl","type":"string","label":"Source URL","secret":false,"default":"{event.properties.$current_url}","required":false,"description":"The URL the conversion happened on. Required when the action source is \"Web\"."},{"key":"oppref","type":"string","label":"OpenAI click identifier (oppref)","secret":false,"default":"{event.properties.oppref ?? person.properties.oppref ?? person.properties.$initial_oppref}","required":false,"description":"The privacy-preserving identifier (oppref) OpenAI appends to ad click-through URLs. PostHog does not capture it automatically, so send it as an event or person property yourself. It gives the most accurate attribution, but conversions can also match on the obref cookie, hashed email, or hashed external ID when it is not available."},{"key":"obref","type":"string","label":"OpenAI browser identifier (obref)","secret":false,"default":"{person.properties.$obref}","required":false,"description":"The value of the __obref first-party cookie set by the OpenAI pixel, sent unhashed. PostHog does not read the cookie automatically, so send it as a person property yourself. Only send it for users who have consented to measurement."},{"key":"email","type":"string","label":"Email address","secret":false,"default":"{person.properties.email}","required":false,"description":"Email address for conversion matching. Sent SHA-256 hashed; leave blank to omit. Normalize (lowercase, trimmed) for best match rates."},{"key":"externalId","type":"string","label":"External ID","secret":false,"default":"{person.properties.external_id}","required":false,"description":"A stable pseudonymous customer ID for conversion matching. Sent SHA-256 hashed; leave blank to omit. Do not use raw emails or phone numbers here."},{"key":"ipAddress","type":"string","label":"IP address","secret":false,"default":"{event.properties.$ip}","required":false,"description":"The IP address of the user, used to improve conversion matching."},{"key":"userAgent","type":"string","label":"User agent","secret":false,"default":"{event.properties.$raw_user_agent}","required":false,"description":"The user agent of the browser the conversion happened in."},{"key":"amount","type":"string","label":"Amount (minor currency units)","secret":false,"default":"","required":false,"description":"The monetary value of the conversion as an integer in ISO 4217 minor units, e.g. 2599 for $25.99. Note this differs from most PostHog revenue properties, which are in major units."},{"key":"currency","type":"string","label":"Currency code","secret":false,"default":"","required":false,"description":"Currency of the amount as an ISO 4217 3-character code, e.g. USD, EUR. Required by OpenAI whenever an amount is sent."}]},{"name":"App opened","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Application Opened","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"choice","label":"Event type","secret":false,"choices":[{"label":"App installed","value":"app_installed"},{"label":"App opened","value":"app_opened"},{"label":"Appointment scheduled","value":"appointment_scheduled"},{"label":"Checkout started","value":"checkout_started"},{"label":"Contents viewed","value":"contents_viewed"},{"label":"Custom","value":"custom"},{"label":"Items added","value":"items_added"},{"label":"Lead created","value":"lead_created"},{"label":"Order created","value":"order_created"},{"label":"Page viewed","value":"page_viewed"},{"label":"Registration completed","value":"registration_completed"},{"label":"Subscription created","value":"subscription_created"},{"label":"Trial started","value":"trial_started"}],"default":"app_opened","required":true,"description":"The OpenAI standard event type this conversion maps to. Pick \"Custom\" to send a custom conversion event."},{"key":"customEventName","type":"string","label":"Custom event name","secret":false,"default":"{event.event}","required":false,"description":"The event name sent when the event type is \"Custom\". Spaces are replaced with dashes and uppercase letters are lowercased. The result must be 1-64 characters of lowercase letters, numbers, underscores, or dashes, and must match the custom event configured in OpenAI Ads Manager."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"A unique ID for the event, used for deduplication against events sent by the OpenAI pixel."},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{toInt(toUnixTimestamp(event.timestamp) * 1000)}","required":true,"description":"The time the event occurred, as a UNIX timestamp in milliseconds (UTC). Must be within the last 7 days."},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"Web","value":"web"},{"label":"Mobile app","value":"mobile_app"},{"label":"Offline","value":"offline"},{"label":"Physical store","value":"physical_store"},{"label":"Phone call","value":"phone_call"},{"label":"Email","value":"email"},{"label":"Other","value":"other"}],"default":"mobile_app","required":true,"description":"Where the conversion happened. Must be \"Mobile app\" for the app installed and app opened event types."},{"key":"sourceUrl","type":"string","label":"Source URL","secret":false,"default":"{event.properties.$current_url}","required":false,"description":"The URL the conversion happened on. Required when the action source is \"Web\"."},{"key":"oppref","type":"string","label":"OpenAI click identifier (oppref)","secret":false,"default":"{event.properties.oppref ?? person.properties.oppref ?? person.properties.$initial_oppref}","required":false,"description":"The privacy-preserving identifier (oppref) OpenAI appends to ad click-through URLs. PostHog does not capture it automatically, so send it as an event or person property yourself. It gives the most accurate attribution, but conversions can also match on the obref cookie, hashed email, or hashed external ID when it is not available."},{"key":"obref","type":"string","label":"OpenAI browser identifier (obref)","secret":false,"default":"{person.properties.$obref}","required":false,"description":"The value of the __obref first-party cookie set by the OpenAI pixel, sent unhashed. PostHog does not read the cookie automatically, so send it as a person property yourself. Only send it for users who have consented to measurement."},{"key":"email","type":"string","label":"Email address","secret":false,"default":"{person.properties.email}","required":false,"description":"Email address for conversion matching. Sent SHA-256 hashed; leave blank to omit. Normalize (lowercase, trimmed) for best match rates."},{"key":"externalId","type":"string","label":"External ID","secret":false,"default":"{person.properties.external_id}","required":false,"description":"A stable pseudonymous customer ID for conversion matching. Sent SHA-256 hashed; leave blank to omit. Do not use raw emails or phone numbers here."},{"key":"ipAddress","type":"string","label":"IP address","secret":false,"default":"{event.properties.$ip}","required":false,"description":"The IP address of the user, used to improve conversion matching."},{"key":"userAgent","type":"string","label":"User agent","secret":false,"default":"{event.properties.$raw_user_agent}","required":false,"description":"The user agent of the browser the conversion happened in."},{"key":"amount","type":"string","label":"Amount (minor currency units)","secret":false,"default":"","required":false,"description":"The monetary value of the conversion as an integer in ISO 4217 minor units, e.g. 2599 for $25.99. Note this differs from most PostHog revenue properties, which are in major units."},{"key":"currency","type":"string","label":"Currency code","secret":false,"default":"","required":false,"description":"Currency of the amount as an ISO 4217 3-character code, e.g. USD, EUR. Required by OpenAI whenever an amount is sent."}]},{"name":"Custom","include_by_default":false,"use_all_events_by_default":null,"filters":{"events":[]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"choice","label":"Event type","secret":false,"choices":[{"label":"App installed","value":"app_installed"},{"label":"App opened","value":"app_opened"},{"label":"Appointment scheduled","value":"appointment_scheduled"},{"label":"Checkout started","value":"checkout_started"},{"label":"Contents viewed","value":"contents_viewed"},{"label":"Custom","value":"custom"},{"label":"Items added","value":"items_added"},{"label":"Lead created","value":"lead_created"},{"label":"Order created","value":"order_created"},{"label":"Page viewed","value":"page_viewed"},{"label":"Registration completed","value":"registration_completed"},{"label":"Subscription created","value":"subscription_created"},{"label":"Trial started","value":"trial_started"}],"default":"custom","required":true,"description":"The OpenAI standard event type this conversion maps to. Pick \"Custom\" to send a custom conversion event."},{"key":"customEventName","type":"string","label":"Custom event name","secret":false,"default":"{event.event}","required":false,"description":"The event name sent when the event type is \"Custom\". Spaces are replaced with dashes and uppercase letters are lowercased. The result must be 1-64 characters of lowercase letters, numbers, underscores, or dashes, and must match the custom event configured in OpenAI Ads Manager."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"A unique ID for the event, used for deduplication against events sent by the OpenAI pixel."},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{toInt(toUnixTimestamp(event.timestamp) * 1000)}","required":true,"description":"The time the event occurred, as a UNIX timestamp in milliseconds (UTC). Must be within the last 7 days."},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"Web","value":"web"},{"label":"Mobile app","value":"mobile_app"},{"label":"Offline","value":"offline"},{"label":"Physical store","value":"physical_store"},{"label":"Phone call","value":"phone_call"},{"label":"Email","value":"email"},{"label":"Other","value":"other"}],"default":"web","required":true,"description":"Where the conversion happened. Must be \"Mobile app\" for the app installed and app opened event types."},{"key":"sourceUrl","type":"string","label":"Source URL","secret":false,"default":"{event.properties.$current_url}","required":false,"description":"The URL the conversion happened on. Required when the action source is \"Web\"."},{"key":"oppref","type":"string","label":"OpenAI click identifier (oppref)","secret":false,"default":"{event.properties.oppref ?? person.properties.oppref ?? person.properties.$initial_oppref}","required":false,"description":"The privacy-preserving identifier (oppref) OpenAI appends to ad click-through URLs. PostHog does not capture it automatically, so send it as an event or person property yourself. It gives the most accurate attribution, but conversions can also match on the obref cookie, hashed email, or hashed external ID when it is not available."},{"key":"obref","type":"string","label":"OpenAI browser identifier (obref)","secret":false,"default":"{person.properties.$obref}","required":false,"description":"The value of the __obref first-party cookie set by the OpenAI pixel, sent unhashed. PostHog does not read the cookie automatically, so send it as a person property yourself. Only send it for users who have consented to measurement."},{"key":"email","type":"string","label":"Email address","secret":false,"default":"{person.properties.email}","required":false,"description":"Email address for conversion matching. Sent SHA-256 hashed; leave blank to omit. Normalize (lowercase, trimmed) for best match rates."},{"key":"externalId","type":"string","label":"External ID","secret":false,"default":"{person.properties.external_id}","required":false,"description":"A stable pseudonymous customer ID for conversion matching. Sent SHA-256 hashed; leave blank to omit. Do not use raw emails or phone numbers here."},{"key":"ipAddress","type":"string","label":"IP address","secret":false,"default":"{event.properties.$ip}","required":false,"description":"The IP address of the user, used to improve conversion matching."},{"key":"userAgent","type":"string","label":"User agent","secret":false,"default":"{event.properties.$raw_user_agent}","required":false,"description":"The user agent of the browser the conversion happened in."},{"key":"amount","type":"string","label":"Amount (minor currency units)","secret":false,"default":"","required":false,"description":"The monetary value of the conversion as an integer in ISO 4217 minor units, e.g. 2599 for $25.99. Note this differs from most PostHog revenue properties, which are in major units."},{"key":"currency","type":"string","label":"Currency code","secret":false,"default":"","required":false,"description":"Currency of the amount as an ISO 4217 3-character code, e.g. USD, EUR. Required by OpenAI whenever an amount is sent."}]}]},{"id":"template-snapchat-ads","name":"Snapchat Ads Conversions","description":"Send conversion events to Snapchat Ads","code":"if (empty(inputs.pixelId) or empty(inputs.oauth.access_token)) {\n    throw Error('Pixel ID and access token are required')\n}\n\nlet body := {\n    'data': [\n        {\n            'event_name': inputs.eventType,\n            'action_source': inputs.actionSource,\n            'event_time': inputs.eventTime,\n            'event_source_url': inputs.eventSourceUrl,\n            'user_data': {},\n            'custom_data': {}\n        }\n    ]\n}\n\nfor (let key, value in inputs.userData) {\n    if (not empty(value)) {\n        body.data.1.user_data[key] := value\n    }\n}\n\nfor (let key, value in inputs.customData) {\n    if (not empty(value)) {\n        body.data.1.custom_data[key] := value\n    }\n}\n\nif (not (not empty(body.data.1.user_data.em) or not empty(body.data.1.user_data.ph) or ( not empty(body.data.1.user_data.client_ip_address) and not empty(body.data.1.user_data.client_user_agent) ))) {\n    return\n}\n\nlet res := fetch(f'https://tr.snapchat.com/v3/{inputs.pixelId}/events{inputs.testEventMode ? '/validate' : ''}?access_token={inputs.oauth.access_token}', {\n    'method': 'POST',\n    'headers': {\n        'Content-Type': 'application/json',\n    },\n    'body': body\n})\nif (res.status >= 400) {\n    throw Error(f'Error from tr.snapchat.com (status {res.status}): {res.body}')\n}","code_language":"hog","inputs_schema":[{"key":"oauth","type":"integration","label":"Snapchat account","secret":false,"required":true,"integration":"snapchat","requiredScopes":"snapchat-offline-conversions-api snapchat-marketing-api"},{"key":"pixelId","type":"string","label":"Pixel ID","secret":false,"required":true,"description":"You must obtain a Pixel ID to use the Conversions API. If you've already set up a Pixel for your website, we recommend that you use the same Pixel ID for your browser and server events."},{"key":"userData","type":"dictionary","label":"User data","secret":false,"default":{"ct":"{not empty(person.properties.$geoip_city_name) ? sha256Hex(replaceAll(lower(person.properties.$geoip_city_name), ' ', '')) : null}","em":"{sha256Hex(lower(person.properties.email))}","fn":"{sha256Hex(lower(person.properties.first_name))}","ln":"{sha256Hex(lower(person.properties.last_name))}","ph":"{not empty(person.properties.phone) ? sha256Hex(replaceAll(person.properties.phone, '+', '')) : null}","st":"{sha256Hex(lower(person.properties.$geoip_subdivision_1_code))}","zp":"{not empty (person.properties.$geoip_postal_code) ? sha256Hex(replaceAll(lower(person.properties.$geoip_postal_code), ' ', '')) : null}","country":"{sha256Hex(lower(person.properties.$geoip_country_code))}","external_id":"{sha256Hex(person.id)}","sc_click_id":"{person.properties.sccid ?? person.properties.$initial_sccid}","client_ip_address":"{event.properties.$ip}","client_user_agent":"{event.properties.$raw_user_agent}"},"required":true,"description":"A map that contains customer information data. See this page for options: https://developers.snap.com/api/marketing-api/Conversions-API/Parameters#user-data-parameters"},{"key":"testEventMode","type":"boolean","label":"Test Event Mode","secret":false,"default":false,"required":false,"description":"Use this field to specify that events should be test events rather than actual traffic. You'll want to disable this field when sending real traffic through this integration."}],"type":"destination","status":"alpha","category":["Advertisement"],"free":false,"icon_url":"/static/services/snapchat.png","filters":null,"masking":null,"mapping_templates":[{"name":"Page viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"$pageview","name":"Pageview","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"PAGE_VIEW","required":true,"description":"Check out this page for possible event types: https://businesshelp.snapchat.com/s/article/pixel-direct-implementation"},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event"},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{floor(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred"},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":true,"description":"The URL of the web page where the event took place"},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"WEB - Conversion was made on your website.","value":"WEB"},{"label":"MOBILE_APP - Conversion was made on your mobile app.","value":"MOBILE_APP"},{"label":"OFFLINE - Conversion happened in a way that is not listed.","value":"OFFLINE"}],"default":"WEB","required":true,"description":"This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{toFloat(event.properties.price ?? event.properties.value ?? event.properties.revenue)}","contents":"{(not empty(event.properties.price) and not empty(event.properties.sku) and not empty(event.properties.quantity) ? [{'item_price': event.properties.price, 'id': event.properties.sku, 'quantity': event.properties.quantity, 'delivery_category': 'normal'}] : [])}","currency":"{event.properties.currency}","event_id":"{event.uuid}","order_id":"{event.properties.orderId ?? event.properties.transactionId ?? event.properties.transaction_id}","num_items":"{event.properties.quantity}","content_ids":"{event.properties.sku}","search_string":"{event.properties.search_string ?? event.properties.query}","content_category":"{event.properties.category}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.snap.com/api/marketing-api/Conversions-API/Parameters#custom-data-parameters"}]},{"name":"Order Completed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Order Completed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"PURCHASE","required":true,"description":"Check out this page for possible event types: https://businesshelp.snapchat.com/s/article/pixel-direct-implementation"},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event"},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{floor(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred"},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":true,"description":"The URL of the web page where the event took place"},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"WEB - Conversion was made on your website.","value":"WEB"},{"label":"MOBILE_APP - Conversion was made on your mobile app.","value":"MOBILE_APP"},{"label":"OFFLINE - Conversion happened in a way that is not listed.","value":"OFFLINE"}],"default":"WEB","required":true,"description":"This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{toFloat(event.properties.price ?? event.properties.value ?? event.properties.revenue)}","contents":"{arrayMap(x -> ({'item_price': x.price, 'id': x.sku, 'quantity': x.quantity, 'delivery_category': 'normal'}), event.properties.products ?? [])}","currency":"{event.properties.currency}","event_id":"{event.uuid}","order_id":"{event.properties.orderId ?? event.properties.transactionId ?? event.properties.transaction_id}","num_items":"{arrayReduce((acc, curr) -> acc + curr.quantity, event.properties.products ?? [], 0)}","content_ids":"{arrayMap(x -> x.sku, event.properties.products ?? [])}","search_string":"{event.properties.search_string ?? event.properties.query}","content_category":"{arrayMap(x -> x.category, event.properties.products ?? [])}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.snap.com/api/marketing-api/Conversions-API/Parameters#custom-data-parameters"}]},{"name":"Checkout Started","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Checkout Started","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"START_CHECKOUT","required":true,"description":"Check out this page for possible event types: https://businesshelp.snapchat.com/s/article/pixel-direct-implementation"},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event"},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{floor(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred"},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":true,"description":"The URL of the web page where the event took place"},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"WEB - Conversion was made on your website.","value":"WEB"},{"label":"MOBILE_APP - Conversion was made on your mobile app.","value":"MOBILE_APP"},{"label":"OFFLINE - Conversion happened in a way that is not listed.","value":"OFFLINE"}],"default":"WEB","required":true,"description":"This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{toFloat(event.properties.price ?? event.properties.value ?? event.properties.revenue)}","contents":"{arrayMap(x -> ({'item_price': x.price, 'id': x.sku, 'quantity': x.quantity, 'delivery_category': 'normal'}), event.properties.products ?? [])}","currency":"{event.properties.currency}","event_id":"{event.uuid}","order_id":"{event.properties.orderId ?? event.properties.transactionId ?? event.properties.transaction_id}","num_items":"{arrayReduce((acc, curr) -> acc + curr.quantity, event.properties.products ?? [], 0)}","content_ids":"{arrayMap(x -> x.sku, event.properties.products ?? [])}","search_string":"{event.properties.search_string ?? event.properties.query}","content_category":"{arrayMap(x -> x.category, event.properties.products ?? [])}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.snap.com/api/marketing-api/Conversions-API/Parameters#custom-data-parameters"}]},{"name":"Product Added","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Added","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"ADD_CART","required":true,"description":"Check out this page for possible event types: https://businesshelp.snapchat.com/s/article/pixel-direct-implementation"},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event"},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{floor(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred"},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":true,"description":"The URL of the web page where the event took place"},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"WEB - Conversion was made on your website.","value":"WEB"},{"label":"MOBILE_APP - Conversion was made on your mobile app.","value":"MOBILE_APP"},{"label":"OFFLINE - Conversion happened in a way that is not listed.","value":"OFFLINE"}],"default":"WEB","required":true,"description":"This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{toFloat(event.properties.price ?? event.properties.value ?? event.properties.revenue)}","contents":"{(not empty(event.properties.price) and not empty(event.properties.sku) and not empty(event.properties.quantity) ? [{'item_price': event.properties.price, 'id': event.properties.sku, 'quantity': event.properties.quantity, 'delivery_category': 'normal'}] : [])}","currency":"{event.properties.currency}","event_id":"{event.uuid}","order_id":"{event.properties.orderId ?? event.properties.transactionId ?? event.properties.transaction_id}","num_items":"{event.properties.quantity}","content_ids":"{event.properties.sku}","search_string":"{event.properties.search_string ?? event.properties.query}","content_category":"{event.properties.category}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.snap.com/api/marketing-api/Conversions-API/Parameters#custom-data-parameters"}]},{"name":"Payment Info Entered","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Payment Info Entered","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"ADD_BILLING","required":true,"description":"Check out this page for possible event types: https://businesshelp.snapchat.com/s/article/pixel-direct-implementation"},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event"},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{floor(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred"},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":true,"description":"The URL of the web page where the event took place"},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"WEB - Conversion was made on your website.","value":"WEB"},{"label":"MOBILE_APP - Conversion was made on your mobile app.","value":"MOBILE_APP"},{"label":"OFFLINE - Conversion happened in a way that is not listed.","value":"OFFLINE"}],"default":"WEB","required":true,"description":"This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{toFloat(event.properties.price ?? event.properties.value ?? event.properties.revenue)}","contents":"{(not empty(event.properties.price) and not empty(event.properties.sku) and not empty(event.properties.quantity) ? [{'item_price': event.properties.price, 'id': event.properties.sku, 'quantity': event.properties.quantity, 'delivery_category': 'normal'}] : [])}","currency":"{event.properties.currency}","event_id":"{event.uuid}","order_id":"{event.properties.orderId ?? event.properties.transactionId ?? event.properties.transaction_id}","num_items":"{event.properties.quantity}","content_ids":"{event.properties.sku}","search_string":"{event.properties.search_string ?? event.properties.query}","content_category":"{event.properties.category}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.snap.com/api/marketing-api/Conversions-API/Parameters#custom-data-parameters"}]},{"name":"Promotion Clicked","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Promotion Clicked","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"AD_CLICK","required":true,"description":"Check out this page for possible event types: https://businesshelp.snapchat.com/s/article/pixel-direct-implementation"},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event"},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{floor(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred"},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":true,"description":"The URL of the web page where the event took place"},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"WEB - Conversion was made on your website.","value":"WEB"},{"label":"MOBILE_APP - Conversion was made on your mobile app.","value":"MOBILE_APP"},{"label":"OFFLINE - Conversion happened in a way that is not listed.","value":"OFFLINE"}],"default":"WEB","required":true,"description":"This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{toFloat(event.properties.price ?? event.properties.value ?? event.properties.revenue)}","contents":"{(not empty(event.properties.price) and not empty(event.properties.sku) and not empty(event.properties.quantity) ? [{'item_price': event.properties.price, 'id': event.properties.sku, 'quantity': event.properties.quantity, 'delivery_category': 'normal'}] : [])}","currency":"{event.properties.currency}","event_id":"{event.uuid}","order_id":"{event.properties.orderId ?? event.properties.transactionId ?? event.properties.transaction_id}","num_items":"{event.properties.quantity}","content_ids":"{event.properties.sku}","search_string":"{event.properties.search_string ?? event.properties.query}","content_category":"{event.properties.category}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.snap.com/api/marketing-api/Conversions-API/Parameters#custom-data-parameters"}]},{"name":"Promotion Viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Promotion Viewed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"AD_VIEW","required":true,"description":"Check out this page for possible event types: https://businesshelp.snapchat.com/s/article/pixel-direct-implementation"},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event"},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{floor(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred"},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":true,"description":"The URL of the web page where the event took place"},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"WEB - Conversion was made on your website.","value":"WEB"},{"label":"MOBILE_APP - Conversion was made on your mobile app.","value":"MOBILE_APP"},{"label":"OFFLINE - Conversion happened in a way that is not listed.","value":"OFFLINE"}],"default":"WEB","required":true,"description":"This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{toFloat(event.properties.price ?? event.properties.value ?? event.properties.revenue)}","contents":"{(not empty(event.properties.price) and not empty(event.properties.sku) and not empty(event.properties.quantity) ? [{'item_price': event.properties.price, 'id': event.properties.sku, 'quantity': event.properties.quantity, 'delivery_category': 'normal'}] : [])}","currency":"{event.properties.currency}","event_id":"{event.uuid}","order_id":"{event.properties.orderId ?? event.properties.transactionId ?? event.properties.transaction_id}","num_items":"{event.properties.quantity}","content_ids":"{event.properties.sku}","search_string":"{event.properties.search_string ?? event.properties.query}","content_category":"{event.properties.category}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.snap.com/api/marketing-api/Conversions-API/Parameters#custom-data-parameters"}]},{"name":"Product Added to Wishlist","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Added to Wishlist","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"ADD_TO_WISHLIST","required":true,"description":"Check out this page for possible event types: https://businesshelp.snapchat.com/s/article/pixel-direct-implementation"},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event"},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{floor(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred"},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":true,"description":"The URL of the web page where the event took place"},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"WEB - Conversion was made on your website.","value":"WEB"},{"label":"MOBILE_APP - Conversion was made on your mobile app.","value":"MOBILE_APP"},{"label":"OFFLINE - Conversion happened in a way that is not listed.","value":"OFFLINE"}],"default":"WEB","required":true,"description":"This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{toFloat(event.properties.price ?? event.properties.value ?? event.properties.revenue)}","contents":"{(not empty(event.properties.price) and not empty(event.properties.sku) and not empty(event.properties.quantity) ? [{'item_price': event.properties.price, 'id': event.properties.sku, 'quantity': event.properties.quantity, 'delivery_category': 'normal'}] : [])}","currency":"{event.properties.currency}","event_id":"{event.uuid}","order_id":"{event.properties.orderId ?? event.properties.transactionId ?? event.properties.transaction_id}","num_items":"{event.properties.quantity}","content_ids":"{event.properties.sku}","search_string":"{event.properties.search_string ?? event.properties.query}","content_category":"{event.properties.category}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.snap.com/api/marketing-api/Conversions-API/Parameters#custom-data-parameters"}]},{"name":"Product Viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Viewed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"VIEW_CONTENT","required":true,"description":"Check out this page for possible event types: https://businesshelp.snapchat.com/s/article/pixel-direct-implementation"},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event"},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{floor(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred"},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":true,"description":"The URL of the web page where the event took place"},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"WEB - Conversion was made on your website.","value":"WEB"},{"label":"MOBILE_APP - Conversion was made on your mobile app.","value":"MOBILE_APP"},{"label":"OFFLINE - Conversion happened in a way that is not listed.","value":"OFFLINE"}],"default":"WEB","required":true,"description":"This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{toFloat(event.properties.price ?? event.properties.value ?? event.properties.revenue)}","contents":"{(not empty(event.properties.price) and not empty(event.properties.sku) and not empty(event.properties.quantity) ? [{'item_price': event.properties.price, 'id': event.properties.sku, 'quantity': event.properties.quantity, 'delivery_category': 'normal'}] : [])}","currency":"{event.properties.currency}","event_id":"{event.uuid}","order_id":"{event.properties.orderId ?? event.properties.transactionId ?? event.properties.transaction_id}","num_items":"{event.properties.quantity}","content_ids":"{event.properties.sku}","search_string":"{event.properties.search_string ?? event.properties.query}","content_category":"{event.properties.category}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.snap.com/api/marketing-api/Conversions-API/Parameters#custom-data-parameters"}]},{"name":"Product List Viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product List Viewed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"VIEW_CONTENT","required":true,"description":"Check out this page for possible event types: https://businesshelp.snapchat.com/s/article/pixel-direct-implementation"},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event"},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{floor(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred"},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":true,"description":"The URL of the web page where the event took place"},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"WEB - Conversion was made on your website.","value":"WEB"},{"label":"MOBILE_APP - Conversion was made on your mobile app.","value":"MOBILE_APP"},{"label":"OFFLINE - Conversion happened in a way that is not listed.","value":"OFFLINE"}],"default":"WEB","required":true,"description":"This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{toFloat(event.properties.price ?? event.properties.value ?? event.properties.revenue)}","contents":"{(not empty(event.properties.price) and not empty(event.properties.sku) and not empty(event.properties.quantity) ? [{'item_price': event.properties.price, 'id': event.properties.sku, 'quantity': event.properties.quantity, 'delivery_category': 'normal'}] : [])}","currency":"{event.properties.currency}","event_id":"{event.uuid}","order_id":"{event.properties.orderId ?? event.properties.transactionId ?? event.properties.transaction_id}","num_items":"{event.properties.quantity}","content_ids":"{event.properties.sku}","search_string":"{event.properties.search_string ?? event.properties.query}","content_category":"{event.properties.category}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.snap.com/api/marketing-api/Conversions-API/Parameters#custom-data-parameters"}]},{"name":"Products Searched","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Products Searched","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventType","type":"string","label":"Event Type","default":"SEARCH","required":true,"description":"Check out this page for possible event types: https://businesshelp.snapchat.com/s/article/pixel-direct-implementation"},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"The ID of the event"},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{floor(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds indicating when the actual event occurred"},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":true,"description":"The URL of the web page where the event took place"},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"WEB - Conversion was made on your website.","value":"WEB"},{"label":"MOBILE_APP - Conversion was made on your mobile app.","value":"MOBILE_APP"},{"label":"OFFLINE - Conversion happened in a way that is not listed.","value":"OFFLINE"}],"default":"WEB","required":true,"description":"This field allows you to specify where your conversions occurred. Knowing where your events took place helps ensure your ads go to the right people."},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{toFloat(event.properties.price ?? event.properties.value ?? event.properties.revenue)}","contents":"{(not empty(event.properties.price) and not empty(event.properties.sku) and not empty(event.properties.quantity) ? [{'item_price': event.properties.price, 'id': event.properties.sku, 'quantity': event.properties.quantity, 'delivery_category': 'normal'}] : [])}","currency":"{event.properties.currency}","event_id":"{event.uuid}","order_id":"{event.properties.orderId ?? event.properties.transactionId ?? event.properties.transaction_id}","num_items":"{event.properties.quantity}","content_ids":"{event.properties.sku}","search_string":"{event.properties.search_string ?? event.properties.query}","content_category":"{event.properties.category}"},"required":true,"description":"A map that contains custom data. See this page for options: https://developers.snap.com/api/marketing-api/Conversions-API/Parameters#custom-data-parameters"}]}]},{"id":"template-microsoft-ads","name":"Microsoft Ads Conversions","description":"Send conversion events to the Microsoft Advertising Conversions API (CAPI)","code":"let userData := {}\nif (not empty(inputs.microsoftClickId)) {\n    userData.msclkid := inputs.microsoftClickId\n}\nif (not empty(inputs.email)) {\n    userData.em := sha256Hex(lower(trim(inputs.email)))\n}\nif (not empty(inputs.phone)) {\n    userData.ph := sha256Hex(lower(trim(inputs.phone)))\n}\n// Microsoft can only attribute a conversion if it carries at least one identifier\nif (length(keys(userData)) == 0) {\n    print('No `microsoftClickId`, `email` or `phone` to identify the user with. Skipping...')\n    return\n}\n\nlet conversion := {\n    'eventType': 'custom',\n    'eventName': inputs.eventName,\n    'eventTime': inputs.eventTime,\n    'userData': userData\n}\nif (not empty(inputs.eventId)) {\n    conversion.eventId := inputs.eventId\n}\n\nlet customData := {}\nif (not empty(inputs.conversionValue)) {\n    customData.value := toFloat(inputs.conversionValue)\n}\nif (not empty(inputs.currency)) {\n    customData.currency := inputs.currency\n}\nif (length(keys(customData)) > 0) {\n    conversion.customData := customData\n}\n\nlet res := fetch(f'https://capi.uet.microsoft.com/v1/{inputs.tagId}/events', {\n    'method': 'POST',\n    'headers': {\n        'Authorization': f'Bearer {inputs.apiToken}',\n        'Content-Type': 'application/json'\n    },\n    'body': {\n        'data': [conversion]\n    }\n})\n\nif (res.status >= 400) {\n    throw Error(f'Error from capi.uet.microsoft.com (status {res.status}): {res.body}')\n}","code_language":"hog","inputs_schema":[{"key":"tagId","type":"string","label":"UET Tag ID","secret":false,"required":true,"description":"The UET tag ID that conversions are sent to. Find it under Tools > UET tag in Microsoft Advertising."},{"key":"apiToken","type":"string","label":"Conversions API token","secret":true,"required":true,"description":"The Conversions API auth token for your UET tag. Obtain it in Microsoft Advertising by selecting \"Use Conversions API\" on the UET tag (pilot program — contact your account manager to enable)."}],"type":"destination","status":"alpha","category":["Advertisement"],"free":false,"icon_url":"/static/services/bing-ads.svg","filters":null,"masking":null,"mapping_templates":[{"name":"Conversion","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"string","label":"Event name","secret":false,"required":true,"description":"The event action used to match a custom conversion goal in Microsoft Advertising. Must match the event configured on your conversion goal."},{"key":"microsoftClickId","type":"string","label":"Microsoft Click ID (msclkid)","secret":false,"default":"{person.properties.msclkid ?? person.properties.$initial_msclkid}","required":false,"description":"The Microsoft click ID (msclkid) associated with this conversion. It gives the most accurate click attribution, but conversions can also match on hashed email or phone when no click ID is available."},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{toInt(toUnixTimestamp(event.timestamp))}","required":true,"description":"The time the event occurred, as a UNIX timestamp in seconds (UTC). Must be within the last 7 days."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":false,"description":"A unique ID for the event, used for deduplication against UET tag events."},{"key":"conversionValue","type":"string","label":"Conversion value","secret":false,"default":"","required":false,"description":"The revenue value of the conversion."},{"key":"currency","type":"string","label":"Currency code","secret":false,"default":"","required":false,"description":"Currency of the conversion value as an ISO 4217 3-character code. For example: USD, EUR."},{"key":"email","type":"string","label":"Email address","secret":false,"default":"{person.properties.email}","required":false,"description":"Email address for enhanced conversions. Sent SHA-256 hashed; leave blank to omit. Normalize (lowercase, trimmed) for best match rates."},{"key":"phone","type":"string","label":"Phone number","secret":false,"default":"{person.properties.phone}","required":false,"description":"Phone number for enhanced conversions. Sent SHA-256 hashed; leave blank to omit. Normalize to E.164 format (e.g. +14255551234) for best match rates."}]}]},{"id":"template-pinterest-ads","name":"Pinterest Ads Conversions","description":"Send conversion events to Pinterest Ads","code":"if (empty(inputs.adAccountId) or empty(inputs.conversionToken)) {\n    throw Error('Ad account ID and conversion token are required')\n}\n\nlet HASHED_USER_KEYS := ['em', 'ph', 'fn', 'ln', 'ct', 'st', 'zp', 'country', 'external_id', 'hashed_maids', 'ge', 'db']\n\nfn normalize(key, value) {\n    let normalized := lower(trim(toString(value)))\n    if (key == 'ph') {\n        for (let symbol in ['+', '-', ' ', '(', ')', '.']) {\n            normalized := replaceAll(normalized, symbol, '')\n        }\n    } else if (key == 'ct') {\n        for (let symbol in [' ', '.', ',', '-', '\\'']) {\n            normalized := replaceAll(normalized, symbol, '')\n        }\n    } else if (key == 'zp') {\n        normalized := replaceAll(normalized, ' ', '')\n    }\n    return normalized\n}\n\n// Pinterest takes a list of hashes per field. A value that is already a SHA-256 hash is sent as is,\n// so a mapping that hashes before sending does not get hashed twice.\nfn hashAll(key, value) {\n    let hashes := []\n    for (let item in (typeof(value) == 'array' ? value : [value])) {\n        let normalized := empty(item) ? '' : normalize(key, item)\n        if (not empty(normalized)) {\n            hashes := arrayPushBack(hashes, match(normalized, '^[a-f0-9]{64}$') ? normalized : sha256Hex(normalized))\n        }\n    }\n    return hashes\n}\n\nfn cleanContent(item) {\n    let cleaned := {}\n    for (let key, value in item) {\n        if ((key == 'item_price' or key == 'id') and not empty(value)) {\n            cleaned[key] := toString(value)\n        } else if (key == 'quantity' and not empty(value)) {\n            cleaned[key] := toInt(value)\n        } else if (not empty(value)) {\n            cleaned[key] := value\n        }\n    }\n    return cleaned\n}\n\nlet payload := {\n    'event_name': inputs.eventName,\n    'action_source': inputs.actionSource,\n    'event_time': toInt(inputs.eventTime),\n    'event_id': toString(inputs.eventId),\n    'user_data': {}\n}\n\nif (not empty(inputs.eventSourceUrl)) {\n    payload.event_source_url := inputs.eventSourceUrl\n}\n\nfor (let key, value in inputs.userData) {\n    if (has(HASHED_USER_KEYS, key)) {\n        let hashes := hashAll(key, value)\n        if (not empty(hashes)) {\n            payload.user_data[key] := hashes\n        }\n    } else if (not empty(value)) {\n        payload.user_data[key] := toString(value)\n    }\n}\n\nfn cleanCustomValue(key, value) {\n    if (key == 'value' or key == 'predicted_ltv') {\n        return toString(value)\n    } else if (key == 'num_items') {\n        return toInt(value)\n    } else if (key == 'content_ids') {\n        let ids := []\n        for (let id in (typeof(value) == 'array' ? value : [value])) {\n            if (not empty(id)) {\n                ids := arrayPushBack(ids, toString(id))\n            }\n        }\n        return ids\n    } else if (key == 'contents') {\n        let contents := []\n        for (let item in value) {\n            let cleaned := cleanContent(item)\n            if (not empty(cleaned)) {\n                contents := arrayPushBack(contents, cleaned)\n            }\n        }\n        return contents\n    }\n    return value\n}\n\nlet customData := {}\nfor (let key, value in inputs.customData) {\n    let cleaned := empty(value) ? null : cleanCustomValue(key, value)\n    if (not empty(cleaned)) {\n        customData[key] := cleaned\n    }\n}\nif (not empty(customData)) {\n    payload.custom_data := customData\n}\n\nlet userData := payload.user_data\nif (empty(userData.em) and empty(userData.hashed_maids) and (empty(userData.client_ip_address) or empty(userData.client_user_agent))) {\n    print('Skipping event: Pinterest needs an email (em), a mobile ad ID (hashed_maids), or both an IP address and a user agent.')\n    return\n}\n\nlet res := fetch(f'https://api.pinterest.com/v5/ad_accounts/{inputs.adAccountId}/events{inputs.testMode ? '?test=true' : ''}', {\n    'method': 'POST',\n    'headers': {\n        'Authorization': f'Bearer {inputs.conversionToken}',\n        'Content-Type': 'application/json',\n    },\n    'body': {'data': [payload]}\n})\n\nif (res.status >= 400) {\n    throw Error(f'Error from api.pinterest.com (status {res.status}): {res.body}')\n}\n\n// Pinterest answers 200 even when it rejects an event, and reports the rejection per event.\nlet result := typeof(res.body) == 'object' and not empty(res.body.events) ? res.body.events[1] : null\nif (result?.status == 'failed') {\n    throw Error(f'Pinterest rejected the event: {result.error_message}')\n}\nif (not empty(result?.warning_message)) {\n    print(f'Pinterest accepted the event with a warning: {result.warning_message}')\n}","code_language":"hog","inputs_schema":[{"key":"adAccountId","type":"string","label":"Ad account ID","secret":false,"required":true,"description":"The ID of your Pinterest ad account. See https://help.pinterest.com/en/business/article/conversions-api"},{"key":"conversionToken","type":"string","label":"Conversion token","secret":true,"required":true,"description":"The conversion access token generated in Pinterest Ads Manager, under Conversions. See https://help.pinterest.com/en/business/article/conversions-api"},{"key":"actionSource","type":"choice","label":"Action source","secret":false,"choices":[{"label":"Web","value":"web"},{"label":"Android app","value":"app_android"},{"label":"iOS app","value":"app_ios"},{"label":"Offline","value":"offline"}],"default":"web","required":true,"description":"Where the conversion happened."},{"key":"eventId","type":"string","label":"Event ID","secret":false,"default":"{event.uuid}","required":true,"description":"A unique ID for the event. Pinterest uses it to deduplicate events sent by both the Pinterest tag and the Conversions API, so use the same ID in both."},{"key":"eventTime","type":"string","label":"Event time","secret":false,"default":"{toInt(toUnixTimestamp(event.timestamp))}","required":true,"description":"A Unix timestamp in seconds of when the event happened."},{"key":"eventSourceUrl","type":"string","label":"Event source URL","secret":false,"default":"{event.properties.$current_url}","required":false,"description":"The URL of the page where the event happened."},{"key":"userData","type":"dictionary","label":"User data","secret":false,"default":{"ct":"{person.properties.$geoip_city_name}","em":"{person.properties.email}","fn":"{person.properties.first_name}","ln":"{person.properties.last_name}","ph":"{person.properties.phone}","st":"{person.properties.$geoip_subdivision_1_code}","zp":"{person.properties.$geoip_postal_code}","country":"{person.properties.$geoip_country_code}","click_id":"{person.properties.epik ?? person.properties.$initial_epik}","external_id":"{person.id}","client_ip_address":"{event.properties.$ip}","client_user_agent":"{event.properties.$raw_user_agent}"},"required":true,"description":"Customer information used for matching. Enter raw values: em, ph, fn, ln, ct, st, zp, country, external_id, hashed_maids, ge and db are lowercased, trimmed and SHA-256 hashed before sending. Empty values are left out. Pinterest needs em, hashed_maids, or both client_ip_address and client_user_agent. See https://developers.pinterest.com/docs/api/v5/events-create"},{"key":"testMode","type":"boolean","label":"Test mode","secret":false,"default":false,"required":false,"description":"Send events as test events. Pinterest validates them and shows them under Test events in Ads Manager, but does not record them. Turn this off to send real traffic."}],"type":"destination","status":"alpha","category":["Advertisement"],"free":false,"icon_url":"/static/services/pinterest.com.png","filters":null,"masking":null,"mapping_templates":[{"name":"Page viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"$pageview","name":"Pageview","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"choice","label":"Event name","secret":false,"choices":[{"label":"Add payment info","value":"add_payment_info"},{"label":"Add to cart","value":"add_to_cart"},{"label":"Add to wishlist","value":"add_to_wishlist"},{"label":"App install","value":"app_install"},{"label":"App open","value":"app_open"},{"label":"Checkout","value":"checkout"},{"label":"Contact","value":"contact"},{"label":"Custom","value":"custom"},{"label":"Customize product","value":"customize_product"},{"label":"Find location","value":"find_location"},{"label":"Initiate checkout","value":"initiate_checkout"},{"label":"Lead","value":"lead"},{"label":"Page visit","value":"page_visit"},{"label":"Schedule","value":"schedule"},{"label":"Search","value":"search"},{"label":"Sign up","value":"signup"},{"label":"Start trial","value":"start_trial"},{"label":"Submit application","value":"submit_application"},{"label":"Subscribe","value":"subscribe"},{"label":"View category","value":"view_category"},{"label":"View content","value":"view_content"},{"label":"Watch video","value":"watch_video"}],"default":"page_visit","required":true,"description":"The Pinterest conversion event. For an event Pinterest does not list, choose \"Custom\". See https://developers.pinterest.com/docs/api/v5/events-create"},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{},"required":false,"description":"Event details such as value, currency and products. Add any other key Pinterest accepts, for example content_name or opt_out_type. Empty values are left out. See https://developers.pinterest.com/docs/api/v5/events-create"}]},{"name":"Product viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Viewed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"choice","label":"Event name","secret":false,"choices":[{"label":"Add payment info","value":"add_payment_info"},{"label":"Add to cart","value":"add_to_cart"},{"label":"Add to wishlist","value":"add_to_wishlist"},{"label":"App install","value":"app_install"},{"label":"App open","value":"app_open"},{"label":"Checkout","value":"checkout"},{"label":"Contact","value":"contact"},{"label":"Custom","value":"custom"},{"label":"Customize product","value":"customize_product"},{"label":"Find location","value":"find_location"},{"label":"Initiate checkout","value":"initiate_checkout"},{"label":"Lead","value":"lead"},{"label":"Page visit","value":"page_visit"},{"label":"Schedule","value":"schedule"},{"label":"Search","value":"search"},{"label":"Sign up","value":"signup"},{"label":"Start trial","value":"start_trial"},{"label":"Submit application","value":"submit_application"},{"label":"Subscribe","value":"subscribe"},{"label":"View category","value":"view_category"},{"label":"View content","value":"view_content"},{"label":"Watch video","value":"watch_video"}],"default":"view_content","required":true,"description":"The Pinterest conversion event. For an event Pinterest does not list, choose \"Custom\". See https://developers.pinterest.com/docs/api/v5/events-create"},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{event.properties.value ?? event.properties.revenue ?? event.properties.price}","contents":"{not empty(event.properties.sku) or not empty(event.properties.product_id) ? [{'id': not empty(event.properties.sku) ? event.properties.sku : event.properties.product_id, 'item_price': event.properties.price, 'quantity': event.properties.quantity, 'item_name': event.properties.name, 'item_brand': event.properties.brand, 'item_category': event.properties.category}] : []}","currency":"{event.properties.currency}","num_items":"{event.properties.quantity}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : (not empty(event.properties.product_id) ? [event.properties.product_id] : [])}","content_name":"{event.properties.name}","content_brand":"{event.properties.brand}","content_category":"{event.properties.category}"},"required":false,"description":"Event details such as value, currency and products. Add any other key Pinterest accepts, for example content_name or opt_out_type. Empty values are left out. See https://developers.pinterest.com/docs/api/v5/events-create"}]},{"name":"Product list viewed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product List Viewed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"choice","label":"Event name","secret":false,"choices":[{"label":"Add payment info","value":"add_payment_info"},{"label":"Add to cart","value":"add_to_cart"},{"label":"Add to wishlist","value":"add_to_wishlist"},{"label":"App install","value":"app_install"},{"label":"App open","value":"app_open"},{"label":"Checkout","value":"checkout"},{"label":"Contact","value":"contact"},{"label":"Custom","value":"custom"},{"label":"Customize product","value":"customize_product"},{"label":"Find location","value":"find_location"},{"label":"Initiate checkout","value":"initiate_checkout"},{"label":"Lead","value":"lead"},{"label":"Page visit","value":"page_visit"},{"label":"Schedule","value":"schedule"},{"label":"Search","value":"search"},{"label":"Sign up","value":"signup"},{"label":"Start trial","value":"start_trial"},{"label":"Submit application","value":"submit_application"},{"label":"Subscribe","value":"subscribe"},{"label":"View category","value":"view_category"},{"label":"View content","value":"view_content"},{"label":"Watch video","value":"watch_video"}],"default":"view_category","required":true,"description":"The Pinterest conversion event. For an event Pinterest does not list, choose \"Custom\". See https://developers.pinterest.com/docs/api/v5/events-create"},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"content_ids":"{arrayMap(x -> not empty(x.sku) ? x.sku : x.product_id, arrayFilter(x -> not empty(x.sku) or not empty(x.product_id), event.properties.products ?? []))}","content_category":"{event.properties.category}"},"required":false,"description":"Event details such as value, currency and products. Add any other key Pinterest accepts, for example content_name or opt_out_type. Empty values are left out. See https://developers.pinterest.com/docs/api/v5/events-create"}]},{"name":"Products searched","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Products Searched","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"choice","label":"Event name","secret":false,"choices":[{"label":"Add payment info","value":"add_payment_info"},{"label":"Add to cart","value":"add_to_cart"},{"label":"Add to wishlist","value":"add_to_wishlist"},{"label":"App install","value":"app_install"},{"label":"App open","value":"app_open"},{"label":"Checkout","value":"checkout"},{"label":"Contact","value":"contact"},{"label":"Custom","value":"custom"},{"label":"Customize product","value":"customize_product"},{"label":"Find location","value":"find_location"},{"label":"Initiate checkout","value":"initiate_checkout"},{"label":"Lead","value":"lead"},{"label":"Page visit","value":"page_visit"},{"label":"Schedule","value":"schedule"},{"label":"Search","value":"search"},{"label":"Sign up","value":"signup"},{"label":"Start trial","value":"start_trial"},{"label":"Submit application","value":"submit_application"},{"label":"Subscribe","value":"subscribe"},{"label":"View category","value":"view_category"},{"label":"View content","value":"view_content"},{"label":"Watch video","value":"watch_video"}],"default":"search","required":true,"description":"The Pinterest conversion event. For an event Pinterest does not list, choose \"Custom\". See https://developers.pinterest.com/docs/api/v5/events-create"},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"search_string":"{event.properties.query ?? event.properties.search_string}"},"required":false,"description":"Event details such as value, currency and products. Add any other key Pinterest accepts, for example content_name or opt_out_type. Empty values are left out. See https://developers.pinterest.com/docs/api/v5/events-create"}]},{"name":"Product added","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Added","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"choice","label":"Event name","secret":false,"choices":[{"label":"Add payment info","value":"add_payment_info"},{"label":"Add to cart","value":"add_to_cart"},{"label":"Add to wishlist","value":"add_to_wishlist"},{"label":"App install","value":"app_install"},{"label":"App open","value":"app_open"},{"label":"Checkout","value":"checkout"},{"label":"Contact","value":"contact"},{"label":"Custom","value":"custom"},{"label":"Customize product","value":"customize_product"},{"label":"Find location","value":"find_location"},{"label":"Initiate checkout","value":"initiate_checkout"},{"label":"Lead","value":"lead"},{"label":"Page visit","value":"page_visit"},{"label":"Schedule","value":"schedule"},{"label":"Search","value":"search"},{"label":"Sign up","value":"signup"},{"label":"Start trial","value":"start_trial"},{"label":"Submit application","value":"submit_application"},{"label":"Subscribe","value":"subscribe"},{"label":"View category","value":"view_category"},{"label":"View content","value":"view_content"},{"label":"Watch video","value":"watch_video"}],"default":"add_to_cart","required":true,"description":"The Pinterest conversion event. For an event Pinterest does not list, choose \"Custom\". See https://developers.pinterest.com/docs/api/v5/events-create"},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{event.properties.value ?? event.properties.revenue ?? event.properties.price}","contents":"{not empty(event.properties.sku) or not empty(event.properties.product_id) ? [{'id': not empty(event.properties.sku) ? event.properties.sku : event.properties.product_id, 'item_price': event.properties.price, 'quantity': event.properties.quantity, 'item_name': event.properties.name, 'item_brand': event.properties.brand, 'item_category': event.properties.category}] : []}","currency":"{event.properties.currency}","num_items":"{event.properties.quantity}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : (not empty(event.properties.product_id) ? [event.properties.product_id] : [])}","content_name":"{event.properties.name}","content_brand":"{event.properties.brand}","content_category":"{event.properties.category}"},"required":false,"description":"Event details such as value, currency and products. Add any other key Pinterest accepts, for example content_name or opt_out_type. Empty values are left out. See https://developers.pinterest.com/docs/api/v5/events-create"}]},{"name":"Product added to wishlist","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Product Added to Wishlist","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"choice","label":"Event name","secret":false,"choices":[{"label":"Add payment info","value":"add_payment_info"},{"label":"Add to cart","value":"add_to_cart"},{"label":"Add to wishlist","value":"add_to_wishlist"},{"label":"App install","value":"app_install"},{"label":"App open","value":"app_open"},{"label":"Checkout","value":"checkout"},{"label":"Contact","value":"contact"},{"label":"Custom","value":"custom"},{"label":"Customize product","value":"customize_product"},{"label":"Find location","value":"find_location"},{"label":"Initiate checkout","value":"initiate_checkout"},{"label":"Lead","value":"lead"},{"label":"Page visit","value":"page_visit"},{"label":"Schedule","value":"schedule"},{"label":"Search","value":"search"},{"label":"Sign up","value":"signup"},{"label":"Start trial","value":"start_trial"},{"label":"Submit application","value":"submit_application"},{"label":"Subscribe","value":"subscribe"},{"label":"View category","value":"view_category"},{"label":"View content","value":"view_content"},{"label":"Watch video","value":"watch_video"}],"default":"add_to_wishlist","required":true,"description":"The Pinterest conversion event. For an event Pinterest does not list, choose \"Custom\". See https://developers.pinterest.com/docs/api/v5/events-create"},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{event.properties.value ?? event.properties.revenue ?? event.properties.price}","contents":"{not empty(event.properties.sku) or not empty(event.properties.product_id) ? [{'id': not empty(event.properties.sku) ? event.properties.sku : event.properties.product_id, 'item_price': event.properties.price, 'quantity': event.properties.quantity, 'item_name': event.properties.name, 'item_brand': event.properties.brand, 'item_category': event.properties.category}] : []}","currency":"{event.properties.currency}","num_items":"{event.properties.quantity}","content_ids":"{not empty(event.properties.sku) ? [event.properties.sku] : (not empty(event.properties.product_id) ? [event.properties.product_id] : [])}","content_name":"{event.properties.name}","content_brand":"{event.properties.brand}","content_category":"{event.properties.category}"},"required":false,"description":"Event details such as value, currency and products. Add any other key Pinterest accepts, for example content_name or opt_out_type. Empty values are left out. See https://developers.pinterest.com/docs/api/v5/events-create"}]},{"name":"Checkout started","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Checkout Started","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"choice","label":"Event name","secret":false,"choices":[{"label":"Add payment info","value":"add_payment_info"},{"label":"Add to cart","value":"add_to_cart"},{"label":"Add to wishlist","value":"add_to_wishlist"},{"label":"App install","value":"app_install"},{"label":"App open","value":"app_open"},{"label":"Checkout","value":"checkout"},{"label":"Contact","value":"contact"},{"label":"Custom","value":"custom"},{"label":"Customize product","value":"customize_product"},{"label":"Find location","value":"find_location"},{"label":"Initiate checkout","value":"initiate_checkout"},{"label":"Lead","value":"lead"},{"label":"Page visit","value":"page_visit"},{"label":"Schedule","value":"schedule"},{"label":"Search","value":"search"},{"label":"Sign up","value":"signup"},{"label":"Start trial","value":"start_trial"},{"label":"Submit application","value":"submit_application"},{"label":"Subscribe","value":"subscribe"},{"label":"View category","value":"view_category"},{"label":"View content","value":"view_content"},{"label":"Watch video","value":"watch_video"}],"default":"initiate_checkout","required":true,"description":"The Pinterest conversion event. For an event Pinterest does not list, choose \"Custom\". See https://developers.pinterest.com/docs/api/v5/events-create"},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{event.properties.value ?? event.properties.revenue ?? event.properties.price}","contents":"{arrayMap(x -> ({'id': not empty(x.sku) ? x.sku : x.product_id, 'item_price': x.price, 'quantity': x.quantity, 'item_name': x.name, 'item_brand': x.brand, 'item_category': x.category}), arrayFilter(x -> not empty(x.sku) or not empty(x.product_id), event.properties.products ?? []))}","currency":"{event.properties.currency}","num_items":"{not empty(event.properties.products) ? arrayReduce((acc, curr) -> acc + toInt(curr.quantity ?? 1), event.properties.products, 0) : null}","content_ids":"{arrayMap(x -> not empty(x.sku) ? x.sku : x.product_id, arrayFilter(x -> not empty(x.sku) or not empty(x.product_id), event.properties.products ?? []))}"},"required":false,"description":"Event details such as value, currency and products. Add any other key Pinterest accepts, for example content_name or opt_out_type. Empty values are left out. See https://developers.pinterest.com/docs/api/v5/events-create"}]},{"name":"Payment info entered","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Payment Info Entered","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"choice","label":"Event name","secret":false,"choices":[{"label":"Add payment info","value":"add_payment_info"},{"label":"Add to cart","value":"add_to_cart"},{"label":"Add to wishlist","value":"add_to_wishlist"},{"label":"App install","value":"app_install"},{"label":"App open","value":"app_open"},{"label":"Checkout","value":"checkout"},{"label":"Contact","value":"contact"},{"label":"Custom","value":"custom"},{"label":"Customize product","value":"customize_product"},{"label":"Find location","value":"find_location"},{"label":"Initiate checkout","value":"initiate_checkout"},{"label":"Lead","value":"lead"},{"label":"Page visit","value":"page_visit"},{"label":"Schedule","value":"schedule"},{"label":"Search","value":"search"},{"label":"Sign up","value":"signup"},{"label":"Start trial","value":"start_trial"},{"label":"Submit application","value":"submit_application"},{"label":"Subscribe","value":"subscribe"},{"label":"View category","value":"view_category"},{"label":"View content","value":"view_content"},{"label":"Watch video","value":"watch_video"}],"default":"add_payment_info","required":true,"description":"The Pinterest conversion event. For an event Pinterest does not list, choose \"Custom\". See https://developers.pinterest.com/docs/api/v5/events-create"},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{event.properties.value ?? event.properties.revenue ?? event.properties.price}","contents":"{arrayMap(x -> ({'id': not empty(x.sku) ? x.sku : x.product_id, 'item_price': x.price, 'quantity': x.quantity, 'item_name': x.name, 'item_brand': x.brand, 'item_category': x.category}), arrayFilter(x -> not empty(x.sku) or not empty(x.product_id), event.properties.products ?? []))}","currency":"{event.properties.currency}","num_items":"{not empty(event.properties.products) ? arrayReduce((acc, curr) -> acc + toInt(curr.quantity ?? 1), event.properties.products, 0) : null}","content_ids":"{arrayMap(x -> not empty(x.sku) ? x.sku : x.product_id, arrayFilter(x -> not empty(x.sku) or not empty(x.product_id), event.properties.products ?? []))}"},"required":false,"description":"Event details such as value, currency and products. Add any other key Pinterest accepts, for example content_name or opt_out_type. Empty values are left out. See https://developers.pinterest.com/docs/api/v5/events-create"}]},{"name":"Order completed","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Order Completed","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"choice","label":"Event name","secret":false,"choices":[{"label":"Add payment info","value":"add_payment_info"},{"label":"Add to cart","value":"add_to_cart"},{"label":"Add to wishlist","value":"add_to_wishlist"},{"label":"App install","value":"app_install"},{"label":"App open","value":"app_open"},{"label":"Checkout","value":"checkout"},{"label":"Contact","value":"contact"},{"label":"Custom","value":"custom"},{"label":"Customize product","value":"customize_product"},{"label":"Find location","value":"find_location"},{"label":"Initiate checkout","value":"initiate_checkout"},{"label":"Lead","value":"lead"},{"label":"Page visit","value":"page_visit"},{"label":"Schedule","value":"schedule"},{"label":"Search","value":"search"},{"label":"Sign up","value":"signup"},{"label":"Start trial","value":"start_trial"},{"label":"Submit application","value":"submit_application"},{"label":"Subscribe","value":"subscribe"},{"label":"View category","value":"view_category"},{"label":"View content","value":"view_content"},{"label":"Watch video","value":"watch_video"}],"default":"checkout","required":true,"description":"The Pinterest conversion event. For an event Pinterest does not list, choose \"Custom\". See https://developers.pinterest.com/docs/api/v5/events-create"},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{event.properties.value ?? event.properties.revenue ?? event.properties.price}","contents":"{arrayMap(x -> ({'id': not empty(x.sku) ? x.sku : x.product_id, 'item_price': x.price, 'quantity': x.quantity, 'item_name': x.name, 'item_brand': x.brand, 'item_category': x.category}), arrayFilter(x -> not empty(x.sku) or not empty(x.product_id), event.properties.products ?? []))}","currency":"{event.properties.currency}","order_id":"{event.properties.order_id ?? event.properties.orderId ?? event.properties.transaction_id}","num_items":"{not empty(event.properties.products) ? arrayReduce((acc, curr) -> acc + toInt(curr.quantity ?? 1), event.properties.products, 0) : null}","content_ids":"{arrayMap(x -> not empty(x.sku) ? x.sku : x.product_id, arrayFilter(x -> not empty(x.sku) or not empty(x.product_id), event.properties.products ?? []))}"},"required":false,"description":"Event details such as value, currency and products. Add any other key Pinterest accepts, for example content_name or opt_out_type. Empty values are left out. See https://developers.pinterest.com/docs/api/v5/events-create"}]},{"name":"Signed up","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Signed Up","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"choice","label":"Event name","secret":false,"choices":[{"label":"Add payment info","value":"add_payment_info"},{"label":"Add to cart","value":"add_to_cart"},{"label":"Add to wishlist","value":"add_to_wishlist"},{"label":"App install","value":"app_install"},{"label":"App open","value":"app_open"},{"label":"Checkout","value":"checkout"},{"label":"Contact","value":"contact"},{"label":"Custom","value":"custom"},{"label":"Customize product","value":"customize_product"},{"label":"Find location","value":"find_location"},{"label":"Initiate checkout","value":"initiate_checkout"},{"label":"Lead","value":"lead"},{"label":"Page visit","value":"page_visit"},{"label":"Schedule","value":"schedule"},{"label":"Search","value":"search"},{"label":"Sign up","value":"signup"},{"label":"Start trial","value":"start_trial"},{"label":"Submit application","value":"submit_application"},{"label":"Subscribe","value":"subscribe"},{"label":"View category","value":"view_category"},{"label":"View content","value":"view_content"},{"label":"Watch video","value":"watch_video"}],"default":"signup","required":true,"description":"The Pinterest conversion event. For an event Pinterest does not list, choose \"Custom\". See https://developers.pinterest.com/docs/api/v5/events-create"},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{},"required":false,"description":"Event details such as value, currency and products. Add any other key Pinterest accepts, for example content_name or opt_out_type. Empty values are left out. See https://developers.pinterest.com/docs/api/v5/events-create"}]},{"name":"Lead generated","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":"Lead Generated","type":"events"}]},"inputs":null,"inputs_schema":[{"key":"eventName","type":"choice","label":"Event name","secret":false,"choices":[{"label":"Add payment info","value":"add_payment_info"},{"label":"Add to cart","value":"add_to_cart"},{"label":"Add to wishlist","value":"add_to_wishlist"},{"label":"App install","value":"app_install"},{"label":"App open","value":"app_open"},{"label":"Checkout","value":"checkout"},{"label":"Contact","value":"contact"},{"label":"Custom","value":"custom"},{"label":"Customize product","value":"customize_product"},{"label":"Find location","value":"find_location"},{"label":"Initiate checkout","value":"initiate_checkout"},{"label":"Lead","value":"lead"},{"label":"Page visit","value":"page_visit"},{"label":"Schedule","value":"schedule"},{"label":"Search","value":"search"},{"label":"Sign up","value":"signup"},{"label":"Start trial","value":"start_trial"},{"label":"Submit application","value":"submit_application"},{"label":"Subscribe","value":"subscribe"},{"label":"View category","value":"view_category"},{"label":"View content","value":"view_content"},{"label":"Watch video","value":"watch_video"}],"default":"lead","required":true,"description":"The Pinterest conversion event. For an event Pinterest does not list, choose \"Custom\". See https://developers.pinterest.com/docs/api/v5/events-create"},{"key":"customData","type":"dictionary","label":"Custom data","secret":false,"default":{"value":"{event.properties.value ?? event.properties.revenue ?? event.properties.price}","currency":"{event.properties.currency}"},"required":false,"description":"Event details such as value, currency and products. Add any other key Pinterest accepts, for example content_name or opt_out_type. Empty values are left out. See https://developers.pinterest.com/docs/api/v5/events-create"}]}]},{"id":"segment-actions-accoil-analytics","name":"Accoil Analytics","description":"Send event data to Accoil Analytics","code":"return event","code_language":"javascript","inputs_schema":[{"key":"api_key","type":"string","label":"API Key","secret":true,"required":true,"description":"Your Accoil.com API Key. You can find your API Key in your Accoil account settings."},{"key":"debug_mode","type":"boolean","label":"Debug Mode","default":false,"description":"Will log configuration and request details"}],"type":"destination","status":"beta","category":[],"free":false,"icon_url":"/static/services/accoil.com.png","filters":null,"masking":null,"mapping_templates":[{"name":"Track Calls","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":null,"name":"All events","type":"events","order":0,"properties":[{"key":"event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')","type":"hogql","value":null}]}]},"inputs":null,"inputs_schema":[{"key":"event","type":"string","label":"Event Name","secret":false,"default":"{event.event}","required":true,"description":"The event name"},{"key":"userId","type":"string","label":"User ID","secret":false,"default":"{person.id}","required":true,"description":"The ID associated with the user"},{"key":"timestamp","type":"string","label":"Timestamp","secret":false,"default":"{event.timestamp}","required":true,"description":"The timestamp of the event"},{"key":"internal_partner_action","type":"string","label":"Partner Action","hidden":true,"secret":false,"default":"track","required":true,"description":"The partner action to use"}]},{"name":"Page Calls","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":null,"name":"All events","type":"events","order":0,"properties":[{"key":"event = '$pageview'","type":"hogql","value":null}]}]},"inputs":null,"inputs_schema":[{"key":"userId","type":"string","label":"User ID","secret":false,"default":"{person.id}","required":false,"description":"The ID associated with the user"},{"key":"name","type":"string","label":"Page Name","secret":false,"default":"{event.event}","required":false,"description":"The name of the page"},{"key":"timestamp","type":"string","label":"Timestamp","secret":false,"default":"{event.timestamp}","required":true,"description":"The timestamp of the event"},{"key":"internal_partner_action","type":"string","label":"Partner Action","hidden":true,"secret":false,"default":"page","required":true,"description":"The partner action to use"}]},{"name":"Screen Calls","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":null,"name":"All events","type":"events","order":0,"properties":[{"key":"event = '$screen'","type":"hogql","value":null}]}]},"inputs":null,"inputs_schema":[{"key":"userId","type":"string","label":"User ID","secret":false,"default":"{person.id}","required":false,"description":"The ID associated with the user"},{"key":"name","type":"string","label":"Screen Name","secret":false,"default":"{event.event}","required":false,"description":"The name of the screen"},{"key":"timestamp","type":"string","label":"Timestamp","secret":false,"default":"{event.timestamp}","required":true,"description":"The timestamp of the event"},{"key":"internal_partner_action","type":"string","label":"Partner Action","hidden":true,"secret":false,"default":"screen","required":true,"description":"The partner action to use"}]},{"name":"Identify Calls","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":null,"name":"All events","type":"events","order":0,"properties":[{"key":"event in ('$identify', '$set')","type":"hogql","value":null}]}]},"inputs":null,"inputs_schema":[{"key":"userId","type":"string","label":"User ID","secret":false,"default":"{person.id}","required":true,"description":"The ID associated with the user"},{"key":"email","type":"string","label":"Email","secret":false,"default":"{person.properties.email}","required":false,"description":"Email addresses are highly recommended as they are often used to identify users across multiple platforms. (Highly Recommended)"},{"key":"name","type":"string","label":"Name","secret":false,"default":"{person.properties.name}","required":false,"description":"Providing a name helps display users in Accoil. If no name is provided, the email address is displayed instead. (Highly Recommended)"},{"key":"role","type":"string","label":"Role","secret":false,"default":"{person.properties.role}","required":false,"description":"Describes the user's role in your product such as Admin, Owner, Team Member. (Suggested) "},{"key":"accountStatus","type":"string","label":"Account Status","secret":false,"default":"{person.properties.accountStatus}","required":false,"description":"Capturing the account status on the user can be helpful to segment users. Possible options include: Free, Trial, Paid, Cancelled (Suggested) "},{"key":"createdAt","type":"string","label":"Created at","secret":false,"default":"{person.properties.createdAt}","required":false,"description":"When was the user created, including this ensures that tenure tracking is accurate. (Highly Recommended) "},{"key":"traits","type":"dictionary","label":"Traits","secret":false,"default":{"$$_extend_object":"{person.properties}"},"required":false,"description":"Optionally send all traits to associate with the user or the group"},{"key":"timestamp","type":"string","label":"Timestamp","secret":false,"default":"{event.timestamp}","required":true,"description":"The timestamp of the event"},{"key":"internal_partner_action","type":"string","label":"Partner Action","hidden":true,"secret":false,"default":"identify","required":true,"description":"The partner action to use"}]},{"name":"Group Calls","include_by_default":true,"use_all_events_by_default":null,"filters":{"events":[{"id":null,"name":"All events","type":"events","order":0,"properties":[{"key":"event = '$groupidentify'","type":"hogql","value":null}]}]},"inputs":null,"inputs_schema":[{"key":"anonymousId","type":"string","label":"Anonymous ID","secret":false,"default":"{event.distinct_id}","required":false,"description":"Anonymous id"},{"key":"userId","type":"string","label":"User ID","secret":false,"default":"{person.id}","required":false,"description":"The ID associated with the user"},{"key":"groupId","type":"string","label":"Group ID","secret":false,"default":"{event.properties.$group_0}","required":true,"description":"The group id"},{"key":"name","type":"string","label":"Name","secret":false,"default":"{person.properties.name}","required":false,"description":"The name of the account. Without providing a name, accounts are displayed using a numeric ID, making them harder to identify. (Highly Recommended)"},{"key":"createdAt","type":"string","label":"Created at","secret":false,"default":"{person.properties.createdAt}","required":false,"description":"Helps calculate account tenure. If no createdAt is provided, the earliest createdAt from the associated users will be used. (Highly Recommended)"},{"key":"status","type":"string","label":"Status","secret":false,"default":"{person.properties.status}","required":false,"description":"The overall status of your the account subscription. Possible options include: Free, Trial, Paid, Cancelled (Highly Recommended)"},{"key":"plan","type":"string","label":"Plan","secret":false,"default":"{person.properties.plan}","required":false,"description":"The plan type helps in segmenting accounts by their subscription tier (e.g., starter, pro, enterprise). (Recommended)"},{"key":"mrr","type":"string","label":"MRR","secret":false,"default":"{person.properties.mrr}","required":false,"description":"Monthly recurring revenue (MRR) is important for segmenting accounts by value. It also allows Accoil to show the dollar value of different segments. Ideally this is passed in cents eg $99 becomes 9900. (Highly Recommended)"},{"key":"traits","type":"dictionary","label":"Traits","secret":false,"default":{"$$_extend_object":"{person.properties}"},"required":false,"description":"Optionally send all traits to associate with the user or the group"},{"key":"timestamp","type":"string","label":"Timestamp","secret":false,"default":"{event.timestamp}","required":true,"description":"The timestamp of the event"},{"key":"internal_partner_action","type":"string","label":"Partner Action","hidden":true,"secret":false,"default":"group","required":true,"description":"The partner action to use"}]}]},{"id":"coming-soon-adjust","name":"Adjust","description":"Send events to Adjust.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Attribution Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/Adjust.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-adlearn","name":"AdLearn","description":"Send events to AdLearn.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/AdLearn.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-adobe-analytics","name":"Adobe Analytics","description":"Send events to Adobe Analytics.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Adobe_Analytics.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-aircall","name":"Aircall","description":"Send events to Aircall.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Customer Service"],"free":true,"icon_url":"/static/coming-soon-destinations/Aircall.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-amazon-personalize","name":"Amazon Personalize","description":"Send events to Amazon Personalize.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Amazon_Personalize.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-ambassador","name":"Ambassador","description":"Send events to Ambassador.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Ambassador.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-amperity","name":"Amperity","description":"Send events to Amperity.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Customer Data Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/Amperity_.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-appsflyer","name":"AppsFlyer","description":"Send events to AppsFlyer.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Attribution Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/AppsFlyer.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-attribution","name":"Attribution","description":"Send events to Attribution.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Attribution Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/Attribution.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-axeptio","name":"Axeptio","description":"Send events to Axeptio.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Consent Management Platform"],"free":true,"icon_url":"/static/coming-soon-destinations/Axeptio.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-bluecore","name":"Bluecore","description":"Send events to Bluecore.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Bluecore.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-blueshift","name":"Blueshift","description":"Send events to Blueshift.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Blueshift.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-branch","name":"Branch","description":"Send events to Branch.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Attribution Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/Branch.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-callingly","name":"Callingly","description":"Send events to Callingly.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Customer Service"],"free":true,"icon_url":"/static/coming-soon-destinations/Callingly.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-chartbeat","name":"Chartbeat","description":"Send events to Chartbeat.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Chartbeat.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-confluent-cloud","name":"Confluent Cloud","description":"Send events to Confluent Cloud.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Event Messaging"],"free":true,"icon_url":"/static/coming-soon-destinations/Confluent_Cloud.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-convertflow","name":"ConvertFlow","description":"Send events to ConvertFlow.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["A/B Testing & Feature Experimentation"],"free":true,"icon_url":"/static/coming-soon-destinations/ConvertFlow.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-crowdpower","name":"CrowdPower","description":"Send events to CrowdPower.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/CrowdPower.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-cruncher","name":"Cruncher","description":"Send events to Cruncher.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Cruncher.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-custify","name":"Custify","description":"Send events to Custify.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["CRM"],"free":true,"icon_url":"/static/coming-soon-destinations/Custify.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-datadog-siem","name":"Datadog SIEM","description":"Send events to Datadog SIEM.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["SIEM"],"free":true,"icon_url":"/static/coming-soon-destinations/Datadog.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-delighted","name":"Delighted","description":"Send events to Delighted.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Surveys"],"free":true,"icon_url":"/static/coming-soon-destinations/Delighted.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-digitalocean-spaces","name":"DigitalOcean Spaces","description":"Send events to DigitalOcean Spaces.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Databases & Object Storage"],"free":true,"icon_url":"/static/coming-soon-destinations/DigitalOcean_Spaces.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-drift","name":"Drift","description":"Send events to Drift.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Business Messaging"],"free":true,"icon_url":"/static/coming-soon-destinations/Drift.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-elastic-security","name":"Elastic Security","description":"Send events to Elastic Security.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["SIEM"],"free":true,"icon_url":"/static/coming-soon-destinations/Elastic_Security.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-elevio","name":"Elevio","description":"Send events to Elevio.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Customer Service"],"free":true,"icon_url":"/static/coming-soon-destinations/Elevio.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-emarsys","name":"Emarsys","description":"Send events to Emarsys.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["CRM"],"free":true,"icon_url":"/static/coming-soon-destinations/Emarsys.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-flurry","name":"Flurry","description":"Send events to Flurry.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Flurry.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-freshsales","name":"Freshsales","description":"Send events to Freshsales.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["CRM"],"free":true,"icon_url":"/static/coming-soon-destinations/Freshsales.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-friendbuy","name":"Friendbuy","description":"Send events to Friendbuy.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Friendbuy.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-funnelenvy","name":"FunnelEnvy","description":"Send events to FunnelEnvy.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/FunnelEnvy.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-gladly","name":"Gladly","description":"Send events to Gladly.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Customer Service"],"free":true,"icon_url":"/static/coming-soon-destinations/Gladly.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-google-optimize","name":"Google Optimize","description":"Send events to Google Optimize.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["A/B Testing & Feature Experimentation"],"free":true,"icon_url":"/static/coming-soon-destinations/Google_Optimize.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-google-sheets","name":"Google Sheets","description":"Send events to Google Sheets.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Productivity"],"free":true,"icon_url":"/static/coming-soon-destinations/Google_Sheets.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-help-scout","name":"Help Scout","description":"Send events to Help Scout.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Customer Service"],"free":true,"icon_url":"/static/coming-soon-destinations/Help_Scout.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-indicative-analytics","name":"Indicative Analytics","description":"Send events to Indicative Analytics.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Indicative_Analytics.webp","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-inmoment","name":"InMoment","description":"Send events to InMoment.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Customer Service"],"free":true,"icon_url":"/static/coming-soon-destinations/InMoment.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-jackdb","name":"JackDB","description":"Send events to JackDB.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Databases & Object Storage"],"free":true,"icon_url":"/static/coming-soon-destinations/JackDB.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-keen-io","name":"Keen.io","description":"Send events to Keen.io.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Keen.io.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-kissmetrics","name":"Kissmetrics","description":"Send events to Kissmetrics.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Kissmetrics.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-kochava","name":"Kochava","description":"Send events to Kochava.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Attribution Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/Kochava.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-kubit","name":"Kubit","description":"Send events to Kubit.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Kubit.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-kustomer","name":"Kustomer","description":"Send events to Kustomer.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Customer Service"],"free":true,"icon_url":"/static/coming-soon-destinations/Kustomer.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-lotame","name":"Lotame","description":"Send events to Lotame.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Attribution Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/Lotame.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-lytics","name":"Lytics","description":"Send events to Lytics.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Lytics.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-madkudu","name":"Madkudu","description":"Send events to Madkudu.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Madkudu.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-mailmodo","name":"Mailmodo","description":"Send events to Mailmodo.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Mailmodo.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-marketo","name":"Marketo","description":"Send events to Marketo.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Marketo.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-marketo-lead-import","name":"Marketo Lead Import","description":"Send events to Marketo Lead Import.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Marketo_Lead_Import.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-mautic","name":"Mautic","description":"Send events to Mautic.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Mautic.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-microsoft-sentinel","name":"Microsoft Sentinel","description":"Send events to Microsoft Sentinel.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["SIEM"],"free":true,"icon_url":"/static/coming-soon-destinations/Microsoft_Sentinel.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-mode-analytics","name":"Mode Analytics","description":"Send events to Mode Analytics.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Mode_Analytics.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-mouseflow","name":"Mouseflow","description":"Send events to Mouseflow.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Heatmap Recording"],"free":true,"icon_url":"/static/coming-soon-destinations/Mouseflow.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-mousestats","name":"MouseStats","description":"Send events to MouseStats.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Heatmap Recording"],"free":true,"icon_url":"/static/coming-soon-destinations/MouseStats.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-nielsen-dcr","name":"Nielsen DCR","description":"Send events to Nielsen DCR.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Attribution Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/Nielsen_DCR.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-ninetailed","name":"Ninetailed","description":"Send events to Ninetailed.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["A/B Testing & Feature Experimentation"],"free":true,"icon_url":"/static/coming-soon-destinations/Ninetailed.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-olark","name":"Olark","description":"Send events to Olark.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Customer Service"],"free":true,"icon_url":"/static/coming-soon-destinations/Olark.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-ometria","name":"Ometria","description":"Send events to Ometria.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Ometria.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-ortto-autopilot","name":"Ortto (Autopilot)","description":"Send events to Ortto (Autopilot).","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Ortto_Autopilot_.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-persistiq-cloud-mode","name":"PersistIQ Cloud Mode","description":"Send events to PersistIQ Cloud Mode.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/PersistIQ_Cloud_Mode.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-pingdom","name":"Pingdom","description":"Send events to Pingdom.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Error Reporting & Monitoring"],"free":true,"icon_url":"/static/coming-soon-destinations/Pingdom.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-pipedream","name":"PipeDream","description":"Send events to PipeDream.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Automation"],"free":true,"icon_url":"/static/coming-soon-destinations/PipeDream.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-profitwell","name":"ProfitWell","description":"Send events to ProfitWell.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/ProfitWell.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-promoter-io","name":"Promoter.io","description":"Send events to Promoter.io.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Surveys"],"free":true,"icon_url":"/static/coming-soon-destinations/Promoter.io.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-qualaroo","name":"Qualaroo","description":"Send events to Qualaroo.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Customer Service"],"free":true,"icon_url":"/static/coming-soon-destinations/Qualaroo.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-quantum-metric","name":"Quantum Metric","description":"Send events to Quantum Metric.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Quantum_Metric.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-rakuten","name":"Rakuten","description":"Send events to Rakuten.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Rakuten.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-redash","name":"Redash","description":"Send events to Redash.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Redash.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-refiner","name":"Refiner","description":"Send events to Refiner.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Customer Service"],"free":true,"icon_url":"/static/coming-soon-destinations/Refiner.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-rockerbox","name":"Rockerbox","description":"Send events to Rockerbox.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Attribution Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/Rockerbox.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-roku","name":"Roku","description":"Send events to Roku.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Streaming Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/Roku.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-rollbar","name":"Rollbar","description":"Send events to Rollbar.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Error Reporting & Monitoring"],"free":true,"icon_url":"/static/coming-soon-destinations/Rollbar.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-saasquatch","name":"SaaSquatch","description":"Send events to SaaSquatch.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/SaaSquatch.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-salesforce-marketing-cloud","name":"Salesforce Marketing Cloud","description":"Send events to Salesforce Marketing Cloud.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Salesforce_Marketing_Cloud.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-sentry","name":"Sentry","description":"Send events to Sentry.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Error Reporting & Monitoring"],"free":true,"icon_url":"/static/coming-soon-destinations/Sentry.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-shynet","name":"Shynet","description":"Send events to Shynet.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Shynet.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-snapengage","name":"SnapEngage","description":"Send events to SnapEngage.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Business Messaging"],"free":true,"icon_url":"/static/coming-soon-destinations/SnapEngage.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-splunk","name":"Splunk","description":"Send events to Splunk.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["SIEM"],"free":true,"icon_url":"/static/coming-soon-destinations/Splunk.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-tableau","name":"Tableau","description":"Send events to Tableau.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Tableau.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-tapstream","name":"Tapstream","description":"Send events to Tapstream.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Attribution Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/Tapstream.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-tradedesk","name":"Tradedesk","description":"Send events to Tradedesk.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Advertising"],"free":true,"icon_url":"/static/coming-soon-destinations/Tradedesk.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-tradedesk-audience","name":"Tradedesk Audience","description":"Send events to Tradedesk Audience.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Advertising"],"free":true,"icon_url":"/static/coming-soon-destinations/Tradedesk_Audience.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-trafficguard","name":"TrafficGuard","description":"Send events to TrafficGuard.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Authentication Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/TrafficGuard.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-tray-io","name":"Tray.io","description":"Send events to Tray.io.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Automation"],"free":true,"icon_url":"/static/coming-soon-destinations/Tray.io.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-tvsquared","name":"TVSquared","description":"Send events to TVSquared.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Attribution Platforms"],"free":true,"icon_url":"/static/coming-soon-destinations/TVSquared.png","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-user-com","name":"User.com","description":"Send events to User.com.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Business Messaging"],"free":true,"icon_url":"/static/coming-soon-destinations/User.com.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-variance","name":"Variance","description":"Send events to Variance.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["CRM"],"free":true,"icon_url":"/static/coming-soon-destinations/Variance.webp","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-vitally","name":"Vitally","description":"Send events to Vitally.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Marketing"],"free":true,"icon_url":"/static/coming-soon-destinations/Vitally.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-woopra","name":"Woopra","description":"Send events to Woopra.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Woopra.svg","filters":null,"masking":null,"mapping_templates":null},{"id":"coming-soon-youbora","name":"Youbora","description":"Send events to Youbora.","code":"return event;","code_language":"javascript","inputs_schema":[],"type":"destination","status":"coming_soon","category":["Analytics"],"free":true,"icon_url":"/static/coming-soon-destinations/Youbora.png","filters":null,"masking":null,"mapping_templates":null}]}