1(self.webpackChunkreddit_ads_api_site=self.webpackChunkreddit_ads_api_site||[]).push([[3407],{29497:(e,n,s)=>{"use strict";s.d(n,{A:()=>l});s(96540);var i=s(34164),t=s(26972),r=s(94687);const d={docCardListItem:"docCardListItem_W1sv"};var o=s(74848);function a({className:e}){const n=(0,t.a4)();return(0,o.jsx)(l,{items:n,className:e})}function c({item:e}){return(0,o.jsx)("article",{className:(0,i.A)(d.docCardListItem,"col col--6"),children:(0,o.jsx)(r.A,{item:e})})}function l(e){const{items:n,className:s}=e;if(!n)return(0,o.jsx)(a,{...e});const r=(0,t.d1)(n);return(0,o.jsx)("section",{className:(0,i.A)("row",s),children:r.map((e,n)=>(0,o.jsx)(c,{item:e},n))})}},38671:(e,n,s)=>{"use strict";s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"api/conversions-api","title":"Conversions API","description":"The Conversions API (CAPI) is a secure server-to-server data connection tool that shares conversion event data with Reddit Ads without needing website code.","source":"@site/versioned_docs/version-v2/api/conversions-api.tag.mdx","sourceDirName":"api","slug":"/api/conversions-api","permalink":"/docs/v2/api/conversions-api","draft":false,"unlisted":false,"editUrl":null,"tags":[],"version":"v2","frontMatter":{"id":"conversions-api","title":"Conversions API","custom_edit_url":null,"description":"The Conversions API (CAPI) is a secure server-to-server data connection tool that shares conversion event data with Reddit Ads without needing website code."},"sidebar":"openApiSidebar","previous":{"title":"Introduction","permalink":"/docs/v2/api/reddit-advertising-api"},"next":{"title":"Posts conversion events ready to be processed","permalink":"/docs/v2/api/posts-conversion-events-ready-to-be-processed"}}');var t=s(74848),r=s(28453),d=s(29497),o=s(83262);const a={id:"conversions-api",title:"Conversions API",custom_edit_url:null,description:"The Conversions API (CAPI) is a secure server-to-server data connection tool that shares conversion event data with Reddit Ads without needing website code."},c=void 0,l={},h=[{value:"Direct integration",id:"direct-integration",level:2},{value:"Prerequisites and considerations",id:"prerequisites-and-considerations",level:3},{value:"1. Retrieve your Pixel ID",id:"1-retrieve-your-pixel-id",level:3},{value:"2. Generate a conversion access token",id:"2-generate-a-conversion-access-token",level:3},{value:"3. Set up events <a></a>",id:"3-set-up-events-",level:3},{value:"Hashing email addresses",id:"hashing-email-addresses",level:5},{value:"Hashing phone numbers",id:"hashing-phone-numbers",level:5},{value:"Hashing MAIDs",id:"hashing-maids",level:5},{value:"Hashing external ID",id:"hashing-external-id",level:5},{value:"4. Set up deduplication <a></a>",id:"4-set-up-deduplication-",level:3},{value:"Conversion ID (recommended)",id:"conversion-id-recommended",level:4},{value:"Session-based deduplication (default)",id:"session-based-deduplication-default",level:4},{value:"Generate unique conversion IDs",id:"generate-unique-conversion-ids",level:4},{value:"Things to know",id:"things-to-know",level:4},{value:"Verify conversion events",id:"verify-conversion-events",level:2},{value:"Events Manager",id:"events-manager",level:3},{value:"1. Check signal delivery",id:"1-check-signal-delivery",level:4},{value:"2. Verify events",id:"2-verify-events",level:4},{value:"3. Trigger conversion events",id:"3-trigger-conversion-events",level:4},{value:"4. Troubleshooting errors",id:"4-troubleshooting-errors",level:4},{value:"Common errors",id:"common-errors",level:5},{value:"Common warnings",id:"common-warnings",level:5},{value:"<code>POST Get a report</code>",id:"post-get-a-report",level:3},{value:"1. Fix the index mapping",id:"1-fix-the-index-mapping",level:4},{value:"2. Get the report for a custom event",id:"2-get-the-report-for-a-custom-event",level:4},{value:"Error handling",id:"error-handling",level:2},{value:"General errors",id:"general-errors",level:3},{value:"<strong>401 errors</strong>",id:"401-errors",level:3},{value:"429 errors - Too many requests",id:"429-errors---too-many-requests",level:3},{value:"500 errors",id:"500-errors",level:3},{value:"Best practices",id:"best-practices",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",h
15:"h5",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components},{Details:i}=n;return i||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://ads-api.reddit.com/docs/v3/capi-direct-integration",children:"Conversions API v3"})," is now available. Advertisers are encouraged to migrate to take advantage of new features and long-term support."]})}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"Contact your account manager for additional integration resources."})}),"\n",(0,t.jsx)(n.p,{children:"The Conversions API (CAPI) is a secure server-to-server data connection tool that shares conversion event data with Reddit Ads without needing website code. Server-side connections are more resilient to signal loss and strengthen campaign performance with improved measurement, targeting, and optimization."}),"\n",(0,t.jsx)(n.p,{children:"There are several ways you can set up CAPI:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsxs)(n.strong,{children:[(0,t.jsx)("a",{href:"https://business.reddithelp.com/s/article/capi-pixel-gtm",target:"_blank",children:"Google Tag Manager (GTM)"}),"."]})," You can set up the CAPI using server-side tagging with your GTM account. We recommend using GTM if you already use it to track your conversions."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Direct integration."})," If you want more flexibility and control of your data, we recommend a direct integration. This method requires some in-house developer resources to set up."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsxs)(n.strong,{children:[(0,t.jsx)("a",{href:"https://business.reddithelp.com/s/article/Conversion-Tracking-Supported-Partner-Integrations",target:"_blank",children:"Supported partner integrations"}),"."]})," Implement CAPI using one of our trusted partners to simplify setup, avoid errors, and save development resources."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"direct-integration",children:"Direct integration"}),"\n",(0,t.jsx)(n.h3,{id:"prerequisites-and-considerations",children:"Prerequisites and considerations"}),"\n",(0,t.jsx)(n.p,{children:"Before you start, you\u2019ll need to:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Create a Reddit Ads account."})," ",(0,t.jsx)("a",{href:"https://business.reddithelp.com/s/article/Create-and-manage-your-Reddit-Ads-account#set-up-your-account-for-ads",target:"_blank",children:"Set up your business on Reddit Ads"})," or ",(0,t.jsx)("a",{href:"https://business.reddithelp.com/s/article/Create-and-manage-your-Reddit-Ads-account#join-a-business",target:"_blank",children:"join your team\u2019s account"})," as a creator or administrator."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Find your Reddit Pixel ID."})," Specify which business account should receive your conversions. You can find your Pixel ID in the ",(0,t.jsx)(n.a,{href:"https://ads.reddit.com/events-manager",children:"Events Manager"}),", and it should match the business account's Pixel ID found in ",(0,t.jsx)(n.a,{href:"https://ads.reddit.com/accounts",children:"Accounts"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"You should also be familiar with the CAPI requirements and product functionality:\xa0"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"CAPI supports a variety of sources, including desktop, mobile, app, and offline events."}),"\n",(0,t.jsx)(n.li,{children:"We recommend sending conversions via CAPI as close to real-time as possible, but events must be sent within seven days after they occur."}),"\n",(0,t.jsxs)(n.li,{children:["We require ",(0,t.jsx)(n.a,{href:"#set-up-deduplication",children:"event deduplication"})," if you use the ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/reddit-pixel",children:"Reddit Pixel"})," and Conversions API together (which we recommend for best performance). The event with more event metadata and match keys will be prioritized. Deduplication is not required when the event is only sent through one integration type. Learn more about ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/event-deduplication",children:"event deduplication"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Some ",(0,t.jsx)(n.a,{href:"#attribution-matching",children:"match keys (unique event and user identifiers)"})," are required for each conversion event to ensure accurate matching and attribution. We recommend sending as many identifiers as possible to help improve attribution accuracy and fuel performance."]}),"\n",(0,t.jsxs)(n.li,{children:["Your use of CAPI is subject to the agreements in the ",(0,t.jsx)(n.a,{href:"https://www.reddithelp.com/en/categories/advertising/policy-guidelines/reddit-ads-api-terms",children:"Ads API"})," and ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/Reddit-Business-Tool-Terms",children:"Reddit Business Tool"})," terms."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"1-retrieve-your-pixel-id",children:"1. Retrieve your Pixel ID"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["In the ",(0,t.jsx)(n.a,{href:"https://ads.reddit.com/events-manager",children:"Events Manager"}),", select ",(0,t.jsx)(n.em,{children:"Configure data source"})," and choose ",(0,t.jsx)(n.a,{href:"https://ads.reddit.com/events-manager/manual-setup/capi",children:(0,t.jsx)(n.em,{children:"Conversions API > Set up manually"})}),". If you haven\u2019t set up CAPI or the Pixel yet, select ",(0,t.jsx)(n.em,{children:"Conversions API Only"})," instead."]}),"\n",(0,t.jsxs)(n.li,{children:["Select ",(0,t.jsx)(n.em,{children:"Copy to Clipboard"})," to save your Pixel ID to your clipboard.\n",(0,t.jsx)(n.img,{alt:"Copy your Pixel ID",src:s(76913).A+"",width:"1500",height:"400"})]}),"\n",(0,t.jsx)(n.li,{children:"Paste the value in a safe place."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"2-generate-a-conversion-access-token",children:"2. Generate a conversion access token"}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["Learn more about ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/conversion-access-token",children:"conversion access tokens"}),"."]})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Select ",(0,t.jsx)(n.em,{children:"Generate Access Token."})," \xa0\n",(0,t.jsx)(n.img,{alt:"Create access token",src:s(49338).A+"",width:"1500",height:"400"})]}),"\n",(0,t.jsxs)(n.li,{children:["Give your token a name, like ",(0,t.jsx)(n.em,{children:"My Reddit Conversion Token"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Select ",(0,t.jsx)(n.em,{children:"Generate"})," to create your token."]}),"\n",(0,t.jsxs)(n.li,{children:["Select ",(0,t.jsx)(n.em,{children:"Copy to Clipboard & Close"}),".","\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsx)(n.p,{children:"This value cannot be retrieved later. You\u2019ll need to generate a new token."})}),"\n",(0,t.jsx)(n.img,{alt:"Copy your conversion access token",src:s(89553).A+"",width:"1143",he
1ight:"600"})]}),"\n",(0,t.jsx)(n.li,{children:"Paste the value in a safe place."}),"\n"]}),"\n",(0,t.jsxs)(n.h3,{id:"3-set-up-events-",children:["3. Set up events ",(0,t.jsx)("a",{id:"set-up-events"})]}),"\n",(0,t.jsx)(n.p,{children:"Access your website\u2019s server and configure conversion events to the following endpoint:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"https://ads-api.reddit.com/api/v2.0/conversions/events/{{pixel_id}}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["You can send ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/supported-conversion-events#supported-conversion-events",children:"standard conversion events"}),", custom conversion events, or both. If your event is well-formatted and valid, you\u2019ll receive a response like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{"message":"Successfully processed 1 conversion events."}\n'})}),"\n",(0,t.jsx)(n.p,{children:"or this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{"message":"In test mode. 1 conversion events were validated but not processed."}\n'})}),"\n",(0,t.jsxs)(i,{children:[(0,t.jsx)("summary",{children:"Custom conversion events"}),(0,t.jsxs)(n.p,{children:["To send a custom conversion event, set ",(0,t.jsx)(n.code,{children:"tracking_type"})," to ",(0,t.jsx)(n.code,{children:'"Custom"'})," and assign ",(0,t.jsx)(n.code,{children:"custom_event_name"})," to a value that doesn\u2019t match our pre-existing events. This free-form and case-sensitive value may use any UTF-8 character up to 64 characters, including spaces. For example, ",(0,t.jsx)(n.code,{children:"Promotion Event"})," and ",(0,t.jsx)(n.code,{children:"PromotionEvent"})," will be considered two distinct events."]}),(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsx)(n.p,{children:"Only the 20 most recent custom events will be visible on the dashboard."})}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'"events": [\n\xa0\xa0\xa0\xa0{\n\xa0\xa0\xa0\xa0\xa0\xa0"event_at": "{{ISO 8601 date and time}}",\n\xa0\xa0\xa0\xa0\xa0\xa0"event_type": {\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"tracking_type": "Custom",\n "custom_event_name": "{{Event name}}"\n\xa0\xa0\xa0\xa0\xa0\xa0}\n\xa0\xa0\xa0\xa0}\n\xa0\xa0]\n'})})]}),"\n",(0,t.jsxs)(i,{children:[(0,t.jsx)("summary",{id:"action-source",children:"Action source"}),(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/omni-attribution",children:(0,t.jsx)(n.em,{children:"Action source"})})," identifies whether a conversion happened online, offline, or through another source. This is used for ",(0,t.jsx)("a",{href:"https://business.reddithelp.com/s/article/the-dashboard",children:"source-level conversion metrics"})," in reporting."]}),(0,t.jsxs)(n.p,{children:["If left ",(0,t.jsx)(n.code,{children:"null"}),", this defaults to ",(0,t.jsx)(n.code,{children:"WEBSITE"}),"."]}),(0,t.jsxs)(n.p,{children:["Set up this parameter in ",(0,t.jsx)(n.code,{children:'"events"'}),":"]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'"events": [\n\xa0\xa0{\n\xa0\xa0\xa0\xa0"action_source": "WEBSITE"\n ...\n\xa0\xa0}\n]\n'})}),(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/event-deduplication",children:"Event deduplication"})," applies only for events in the same channel."]})})]}),"\n",(0,t.jsxs)(i,{children:[(0,t.jsx)("summary",{id:"attribution-matching",children:"Match keys"}),(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/about-match-keys",children:(0,t.jsx)(n.em,{children:"Match keys"})})," are identifiers you can share with conversion events and are crucial to help match conversions to a Reddit Ads engagement like a view or click. To increase attribution accuracy, we strongly recommend sharing these signals:"]}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"click_id"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"email"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"phone_number"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"uuid"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"ip_address"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"user_agent"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"screen_dimensions"})}),"\n"]}),(0,t.jsxs)(n.p,{children:["You can set up these parameters in ",(0,t.jsx)(n.code,{children:'"events"'}),":"]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'"events": [\n\xa0\xa0{\n\xa0\xa0\xa0\xa0"click_id": "12345",\n\xa0\xa0\xa0\xa0"user": {\n\xa0\xa0\xa0\xa0\xa0\xa0"ip_address": "192.168.0.1",\n\xa0\xa0\xa0\xa0\xa0\xa0"user_agent": "Chrome/98.0.4758.102",\n\xa0\xa0\xa0\xa0\xa0\xa0"screen_dimensions": {\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"width": 1920,\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"height": 1080\n\xa0\xa0\xa0\xa0\xa0\xa0},\n\xa0\xa0\xa0\xa0\xa0\xa0"uuid": "1677712978045.b8f7eb7d-b357-437b-8bd3-e1c8166c7132",\n\xa0\xa0\xa0\xa0\xa0\xa0"email": "[email protected]",\n "phone_number":"+15554441234",\n\xa0\xa0\xa0\xa0\xa0\xa0"external_id": "customer12345",\n\xa0\xa0\xa0\xa0\xa0\xa0"idfa": "8A2E4F6D-0852-4B2A-B9D5-79334DE14B16",\n\xa0\xa0\xa0\xa0\xa0\xa0"aaid": "38400000-8cf0-11bd-b23e-10b96e40000d"\n\xa0\xa0\xa0\xa0}\n\xa0\xa0}\n]\n'})}),(0,t.jsx)(n.p,{children:"Some signals can be shared unhashed or pre-hashed. If you\u2019d like to hash signals, we recommend using SHA-256 and following the hashing guidance."}),(0,t.jsx)(n.h5,{id:"hashing-email-addresses",children:"Hashing email addresses"}),(0,t.jsxs)(n.p,{children:["Email addresses should be formatted like ",(0,t.jsx)(n.code,{children:"[email protected]"}
1),". Events with invalid values\u2014such as ",(0,t.jsx)(n.code,{children:"\u2018First Last\u2019 <[email protected]>"}),"\u2014will still be accepted, but a warning will appear in the ",(0,t.jsx)(n.a,{href:"#events-manager",children:"Events Manager"}),"."]}),(0,t.jsx)(n.p,{children:"The email address must be canonicalized before hashing:"}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"the address should be lowercase"}),"\n",(0,t.jsx)(n.li,{children:"the local part of the address should have any dots removed, and any text after a plus sign should be removed"}),"\n",(0,t.jsx)(n.li,{children:"SHA-256 should be used to hash the identifier, and 64 lowercase hex digits should be given"}),"\n"]}),(0,t.jsxs)(n.p,{children:["For example, ",(0,t.jsx)(n.code,{children:"[email protected]"})," and ",(0,t.jsx)(n.code,{children:"[email protected]"})," should both hash to ",(0,t.jsx)(n.code,{children:"ff8d9819fc0e12bf0d24892e45987e249a28dce836a85cad60e28eaaa8c6d976"}),"."]}),(0,t.jsxs)(n.p,{children:["Here\u2019s a breakdown for the example of ",(0,t.jsx)(n.code,{children:"[email protected]"}),":"]}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["the address should be lowercase (",(0,t.jsx)(n.code,{children:"[email protected]"})," becomes ",(0,t.jsx)(n.code,{children:"[email protected]"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:["the local part of the address should have any dots removed, and any text after a plus sign should be removed (",(0,t.jsx)(n.code,{children:"[email protected]"})," becomes ",(0,t.jsx)(n.code,{children:"[email protected]"}),")"]}),"\n"]}),(0,t.jsx)(n.h5,{id:"hashing-phone-numbers",children:"Hashing phone numbers"}),(0,t.jsxs)(n.p,{children:["Phone numbers should be formatted like ",(0,t.jsx)(n.code,{children:"+15554441234"}),". Events using invalid formats\u2014like ",(0,t.jsx)(n.code,{children:"+1 (555) 444-1234"}),"\u2014will still be accepted, but a warning will appear in the ",(0,t.jsx)(n.a,{href:"#events-manager",children:"Events Manager"}),"."]}),(0,t.jsx)(n.p,{children:"The phone number must be canonicalized before hashing:"}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"must contain the country and area code"}),"\n",(0,t.jsx)(n.li,{children:"remove the extension"}),"\n",(0,t.jsx)(n.li,{children:"remove all non-numeric characters, including spaces, symbols, and letters"}),"\n",(0,t.jsxs)(n.li,{children:["the number should start with ",(0,t.jsx)(n.code,{children:"+"})]}),"\n",(0,t.jsx)(n.li,{children:"SHA-256 should be used to hash the identifier, and 64 lowercase hex digits should be given"}),"\n"]}),(0,t.jsxs)(n.p,{children:["For example, ",(0,t.jsx)(n.code,{children:"+15554441234"})," and ",(0,t.jsx)(n.code,{children:"+1 (555) 444-1234"})," should both hash to ",(0,t.jsx)(n.code,{children:"e5b124c58580eb16bd959b8d0cac12b12c952e2ceae0203d416cff94f10b994a"}),"."]}),(0,t.jsxs)(n.p,{children:["Here\u2019s a breakdown for the example of ",(0,t.jsx)(n.code,{children:"+1 (555) 444-1234 ext. 789"}),":"]}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["remove the extension (",(0,t.jsx)(n.code,{children:"+1 (555) 444-1234 ext. 789"})," becomes ",(0,t.jsx)(n.code,{children:"+1 (555) 444-1234"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:["remove non-numeric characters\xa0 (",(0,t.jsx)(n.code,{children:"+1 (555) 444-1234"})," becomes ",(0,t.jsx)(n.code,{children:"15554441234"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:["ensure it starts with ",(0,t.jsx)(n.code,{children:"+"})," (",(0,t.jsx)(n.code,{children:"15554441234"})," becomes ",(0,t.jsx)(n.code,{children:"+15554441234"}),")"]}),"\n"]}),(0,t.jsx)(n.h5,{id:"hashing-maids",children:"Hashing MAIDs"}),(0,t.jsxs)(n.p,{children:["When passing an IDFA or AAID directly, it should follow the standard format. Events with invalid IDs\u2014such as placeholder ",(0,t.jsx)(n.code,{children:"00000000-0000-0000-0000-000000000000"}),"\u2014will still be accepted, but a warning will appear in the ",(0,t.jsx)(n.a,{href:"#events-manager",children:"Events Manager"}),"."]}),(0,t.jsx)(n.p,{children:"If you choose to pre-hash the identifier, it should follow a canonical format:"}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"an IDFA should be uppercase hex digits"}),"\n",(0,t.jsx)(n.li,{children:"an AAID should be lowercase hex digits"}),"\n",(0,t.jsx)(n.li,{children:"the dashes should be included"}),"\n",(0,t.jsx)(n.li,{children:"SHA-256 should be used to hash the identifier and 64 lowercase hex digits should be given"}),"\n"]}),(0,t.jsx)(n.p,{children:"For example:"}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["an IDFA of ",(0,t.jsx)(n.code,{children:"EA7583CD-A667-48BC-B806-42ECB2B48606"})," can be hashed to ",(0,t.jsx)(n.code,{children:"70574fa9c8f498a7b2e5c8712b1126de7b1406fd02fdc591821c5bd33092fd1c"})]}),"\n",(0,t.jsxs)(n.li,{children:["an AAID of ",(0,t.jsx)(n.code,{children:"cdda802e-fb9c-47ad-9866-0794d394c912"})," can be hashed to ",(0,t.jsx)(n.code,{children:"f23b554b2a8fb732a8b973733832e70f018da7bc294dfea289735a07d5dd2c9f"})]}),"\n"]}),(0,t.jsx)(n.h5,{id:"hashing-external-id",children:"Hashing external ID"}),(0,t.jsx)(n.p,{children:"An advertiser-assigned custom identifier. We recommend passing an external ID with its corresponding click ID whenever possible."}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Example (unhashed):"})," ",(0,t.jsx)(n.code,{children:"customer12345"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Example (hashed):"})," ",(0,t.jsx)(n.code,{children:"a4cc2fc5adf58a029291c1514d273989113a1d05e1d753c1d0c3a848af7109cc"})]}),"\n"]})]}),"\n",(0,t.jsxs)(i,{children:[(0,t.jsx)("summary",{children:"Event metadata"}),(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.em,{children:(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/about-event-metadata",children:"Event metadata"})})," is detailed information associated with specific actions or events. Setting up metadata shares more performance insights, and using a consistent ",(0,t.jsx)(n.code,{children:"conversion_id"})," is crucial when using both the Pixel and CAPI for deduplication purposes.\xa0"]}),(0,t.jsxs)(n.p,{children:["We strongly recommend setting up ",(0,t.jsx)(n.code,{children:"conversion_id"})," when using both Pixel and Conversions API. ",(0,t.jsx)(n.code,{children:"conversion_id"})," signals can be shared unhashed or pre-hashed. If you\u2019d like to hash it, we recommend using SHA-256."]}),(0,t.jsxs)(n.p,{children:["You can set up event metadata by adding additional parameters to ",(0,t.jsx)(n.code,{children:'"event_metadata"'}),":"]}),(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"quantity"})," and ",(0,t.jsx)(n.code,{children:"item_price"})," are not replacements for ",(0,t.jsx)(n.code,{children:"item_count"})," and ",(0,t.jsx)(n.code,{children:"value_decimal"})," or ",(0,t.jsx)(n.code,{children:"value"}),", which are used for optimization and strongly recommended for revenue-related events."]})}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'"events": [\n\xa0\xa0{\n\xa0\xa0\xa0\xa0"event_metadata": {\n\xa0\xa0\xa0\xa0\xa0\xa0"item_count": {{Number of items}},\n\xa0\xa0\xa0\xa0\xa0\xa0"currency": "{{ISO 4217 3-letter currency code}}",\n\xa0\xa0\xa0\xa0\xa0\xa0"value_decimal": {{Value (decimal)}},\n\xa0\xa0\xa0\xa0\xa0\xa0"conversion_id": "{{Unique ID of the conversion event}}",\n\xa0\xa0\xa0\xa0\xa0\xa0"products": [\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0{\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"id": "{{SKU or GTIN}}",\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"name": "{{Title of the product}}",\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"category": "{{Product group}}",\n "quantity": {{Number of this product}},\n "item_price": {{Unit price}}\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0}\n\xa0\xa0\xa0\xa0\xa0\xa0]\n\xa0\xa0\xa0\xa0}\n\xa0\xa0}\n]\n'})})]}),"\n",(0,t.jsxs)(i,{children:[(0,t.jsx)("summary",{children:"Opt out users"}),(0,t.jsxs)(n.p,{children:["We offer the ",(0,t.jsx)(n.code,{children:"data_processing_options"})," parameter to help your compliance needs, including opting out users if they have not consented to behavioral targeting. Learn more about ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/Limited-Data-Use",children:"Limited Data Use (LDU)"}),"."]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'"data_processing_options": {\n\xa0\xa0\xa0\xa0"modes": [\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"LDU"\n\xa0\xa0\xa0\xa0],\n\xa0\xa0\xa0\xa0"country": "US",\n\xa0\xa0\xa0\xa0"region": "US-CA"\n}\n'})})]}),"\n",(0,t.jsxs)(n.h3,{id:"4-set-up-deduplication-",children:["4. Set up deduplication ",(0,t.jsx)("a",{id:"set-up-deduplication"})]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["Did you set up event deduplication with the conversion ID? Check out the ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/Events-Manager#event-deduplication-panel",children:"event deduplication panel"})," for details on deduplication effectiveness."]})}),"\n",(0,t.jsxs)(n.p,{children:["If you implement both the ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/reddit-pixel",children:"Reddit Pixel"})," and CAPI and the same events are shared across both sources, deduplication is necessary to prevent double-counting. Deduplication occurs every hour. When duplicates are detected, the event(s) with less event metadata and match keys be marked as a duplicate(s). If all events are of equal quality, the earliest event(s) will be preferred."]}),"\n",(0,t.jsxs)(n.p,{children:["Reddit supports two methods: conversion ID and session-based deduplication. For deduplication to occur, events must match one of these methods ",(0,t.jsx)(n.strong,{children:"and"})," be of the same event type. For custom events, the event name must also match. Events that meet these conditions will be evaluated for deduplication. A log of deduplicated events is available for up to seven days."]}),"\n",(0,t.jsx)(n.p,{children:"Events must be sent within two days for proper deduplication."}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"If you share different c
1onversion events for the Reddit Pixel and Conversions API, you don\u2019t have to worry about deduplication."})}),"\n",(0,t.jsx)(n.h4,{id:"conversion-id-recommended",children:"Conversion ID (recommended)"}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"This method is always preferred when a conversion ID is provided."})}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["View your deduplication details in the ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/Events-Manager#event-deduplication-panel",children:"deduplication panel"}),"."]})}),"\n",(0,t.jsx)(n.p,{children:"You can pass a unique conversion ID through the Pixel and CAPI for every distinct conversion event. When this method is chosen, the event with the lower quality will be marked as a duplicate. If equal, the later event will be considered a duplicate."}),"\n",(0,t.jsx)(n.p,{children:"This method is the most accurate way to ensure proper deduplication and minimize the risk of integration errors and attribution inaccuracies.\xa0"}),"\n",(0,t.jsx)(n.p,{children:"To ensure your events are deduplicated:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Create a unique conversion ID for every distinct conversion event. You can set this as a random number or ID. Similarly, you could set this to the order number when tracking purchase events. Learn more about ",(0,t.jsx)(n.a,{href:"#generate-unique-conversion-ids",children:"generating unique conversion IDs"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"Include the event in the Reddit Pixel and CAPI.\xa0"}),"\n",(0,t.jsxs)(n.li,{children:["Ensure the conversion ID for its corresponding events matches.","\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsx)(n.p,{children:"If the conversion ID is improperly passed to too many multiple events, those events will be marked as duplicates and will not be attributed, impacting campaign performance."})}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"session-based-deduplication-default",children:"Session-based deduplication (default)"}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"This method isn\u2019t used when a conversion ID is provided, and it won\u2019t mark events as duplicates if they\u2019re sent only from the Pixel or only from CAPI."})}),"\n",(0,t.jsxs)(n.p,{children:["This deduplication method determines which source\u2014the Pixel or CAPI\u2014is providing higher-quality events within a session. A ",(0,t.jsx)(n.em,{children:"session"})," is a series of events from a single user where no more than five minutes pass between two consecutive events."]}),"\n",(0,t.jsx)(n.p,{children:"To enable deduplication, include either a UUID or external ID on all Pixel and CAPI events. We recommend choosing UUID since it\u2019s automatically passed with Pixel events."}),"\n",(0,t.jsx)(n.p,{children:"When this deduplication method is used, an integration type\u2013CAPI or the Pixel\u2013is selected for each session based on the number of attributable events, or the source that sent the earliest event if both are equal."}),"\n",(0,t.jsx)(n.p,{children:"The events from the selected source will be used for attribution. The other events will be filtered out to keep your reporting accurate.\xa0"}),"\n",(0,t.jsx)(n.h4,{id:"generate-unique-conversion-ids",children:"Generate unique conversion IDs"}),"\n",(0,t.jsx)(n.p,{children:"We recommend generating the conversion ID based on attributes unique to each event. For example, you could set it as the hash of the timestamp, event type, metadata parameters, and user parameters. This way, there will be a unique conversion ID for each unique event, removing the risk of mistakenly deduplicating them."}),"\n",(0,t.jsx)(n.p,{children:"Here\u2019s one way you can do this in JavaScript:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",children:"const crypto = require('crypto');\xa0\nfunction generateConversionID(event_at, tracking_type, metadata_value, ip_address) {\n\xa0\xa0\xa0\xa0// Concatenate the input values\n\xa0\xa0\xa0\xa0const inputString = event_at + tracking_type + metadata_value + ip_address;\n\xa0\xa0\xa0\xa0// Create a SHA-256 hash of the concatenated string\n\xa0\xa0\xa0\xa0const hash = crypto.createHash('sha256');\n\xa0\xa0\xa0\xa0hash.update(inputString);\n\xa0\xa0\xa0\xa0// Return the hash in hexadecimal format\n\xa0\xa0\xa0\xa0return hash.digest('hex');\n}\n// Example usage\nconst event_at = '2024-09-04T12:34:56Z';\nconst tracking_type = 'Purchase';\nconst metadata_value = '100.00';\nconst ip_address = '192.168.1.1';\nconst conversionID = generateConversionID(event_at, tracking_type, metadata_value, ip_address);\nconsole.log('Generated Conversion ID:', conversionID);\n"})}),"\n",(0,t.jsx)(n.h4,{id:"things-to-know",children:"Things to know"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Events must be sent within two days to ensure proper deduplication."}),"\n",(0,t.jsx)(n.li,{children:"When deduplicating using conversion ID, the event with more event metadata and match keys is preferred."}),"\n",(0,t.jsx)(n.li,{children:"Deduplication isn\u2019t necessary when sharing different events with the Reddit Pixel and CAPI."}),"\n",(0,t.jsx)(n.li,{children:"If a conversion ID is used for both integration types, that method will be preferred. Otherwise, session-based deduplication will apply."}),"\n",(0,t.jsxs)(n.li,{children:["View reporting for your events either on ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/the-dashboard",children:"the dashboard"})," or with ",(0,t.jsx)(n.a,{href:"https://ads-api.reddit.com/docs/v3/operations/Get%20A%20Report",children:(0,t.jsx)(n.code,{children:"POST Get a Report"})}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"verify-conversion-events",children:"Verify conversion events"}),"\n",(0,t.jsx)(n.p,{children:"Verifying your CAPI integration will let you know it's accurately tracking events across all browsers and devices. If you don\u2019t do this, you may experience ad delivery and measurement challenges."}),"\n",(0,t.jsxs)(n.p,{children:["We recommend implementing both the Pixel and CAPI to optimize campaign performance. Sharing the same events using both implementations can help minimize signal loss and achieve more efficient results, but may cause events to be double-counted. Set up ",(0,t.jsx)(n.a,{href:"#set-up-deduplication",children:"event deduplication"})," to avoid attribution and reporting discrepancies."]}),"\n",(0,t.jsxs)(n.p,{children:["We also recommend passing ",(0,t.jsx)(n.a,{href:"#attribution-matching",children:"match keys"})," for better match rates and higher attribution rates. This lets you pass high-quality match keys and identifiers (like email, IP, and click ID) using your implementations to increase conversion attribution."]}),"\n",(0,t.jsx)(n.p,{children:"Conversion events can be verified using these methods:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#events-manager",children:(0,t.jsx)(n.strong,{children:"Events Manager"})}),(0,t.jsx)(n.strong,{children:":"})," Trigger conversion events in real time to see if your events are being captured. Third-party cookies must be enabled in your browser settings for event testing. This method is recommended for quick and simple testing."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsxs)(n.strong,{children:[(0,t.jsx)(n.a,{href:"https://ads-api.reddit.com/docs/v3/operations/Get%20Last%20Fired%20At",children:(0,t.jsx)(n.code,{children:"GET Get Last fired at"})}),":"]})," Retrieve the latest time conversion events were sent, in ",(0,t.jsx)(n.a,{href:"https://www.iso.org/iso-8601-date-and-time-format.html",children:"ISO 8601 format"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsxs)(n.strong,{children:[(0,t.jsx)(n.a,{href:"#post-get-a-report",children:(0,t.jsx)(n.code,{children:"POST Get a report"})}),":"]})," Get a report for a your conversion events. This method is recommended for verifying custom conversion events."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"events-manager",children:"Events Manager"}),"\n",(0,t.jsx)(n.h4,{id:"1-check-signal-delivery",children:"1. Check signal delivery"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Go to the ",(0,t.jsx)(n.a,{href:"https://ads.reddit.com/events-manager",children:"Events Manager"})," and check that all your standard and custom conversion events are listed. If any of your events aren\u2019t listed, ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/supported-conversion-events",children:"add those events"})," to your integration.","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Recommendations for c
1onversions:"})," Ensure ",(0,t.jsx)(n.code,{children:"Purchase"}),", ",(0,t.jsx)(n.code,{children:"Lead"}),", and ",(0,t.jsx)(n.code,{children:"SignUp"})," are included."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Requirements for"})," ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/dynamic-product-ads",children:(0,t.jsx)(n.strong,{children:"dynamic product ads (DPA)"})}),(0,t.jsx)(n.strong,{children:":"})," Ensure ",(0,t.jsx)(n.code,{children:"ViewContent"}),", ",(0,t.jsx)(n.code,{children:"AddToCart"}),", and ",(0,t.jsx)(n.code,{children:"Purchase"})," are included.\xa0"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["Verify that your total event counts make sense. For example, if you get a lot of traffic on your site, ",(0,t.jsx)(n.code,{children:"PageVisit"})," shouldn\u2019t be low."]}),"\n",(0,t.jsxs)(n.li,{children:["Check that your domain is listed if you\u2019ve set up the Reddit Pixel. Learn more about ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/Events-Manager#Undetectable-domains",children:"undetectable domains"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["You\u2019ll always see ",(0,t.jsx)(n.em,{children:"undetectable domains"})," for Conversions API, so you can safely ignore this step."]})}),"\n",(0,t.jsx)(n.h4,{id:"2-verify-events",children:"2. Verify events"}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"Test events are subject to a rate limit of 10 events per second."})}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"Batch events aren\u2019t currently supported. Only one event per request will be displayed."})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Open ",(0,t.jsx)(n.a,{href:"https://ads.reddit.com/events-manager/testing",children:"Event Testing"})," in the Ads Manager."]}),"\n",(0,t.jsxs)(n.li,{children:["Copy the test ID provided and set it as ",(0,t.jsx)(n.code,{children:'"test_id\u201d'})," in the POST request.\xa0"]}),"\n",(0,t.jsx)(n.li,{children:"Send test requests to the CAPI endpoint."}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:["Remove ",(0,t.jsx)(n.code,{children:"\u201ctest_id\u201d"})," field from the request before deploying to production."]})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Verify events display in Event Testing and that the metadata, match keys, and conversion ID match your request."}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"Events may be delayed for up to five seconds before appearing on the interface."})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"View the table for event details",src:s(57888).A+"",width:"1452",height:"456"})}),"\n",(0,t.jsx)(n.h4,{id:"3-trigger-conversion-events",children:"3. Trigger conversion events"}),"\n",(0,t.jsxs)(n.p,{children:["Explore your site to manually trigger events and ensure the correct events are being captured. For example, when you add an item to your cart, an ",(0,t.jsx)(n.code,{children:"AddToCart"})," event should fire."]}),"\n",(0,t.jsx)(n.p,{children:"If you're using the integration with DPA, we recommend configuring at least these actions:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Action"}),(0,t.jsx)(n.th,{children:"Event"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"View a variation of a product"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ViewContent"})})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Add product to cart"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"AddToCart"})})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Make a test purchase"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"Purchase"})})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"The event status will be received if the event was configured correctly."}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:["Some events may not be captured in Events Testing. If you don't see any event, try checking it with the ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/Reddit-Pixel-Helper-Chrome-extension",children:"Pixel Helper"}),"."]})}),"\n",(0,t.jsx)(n.p,{children:"As you do that, those events will appear in the table with their status, timestamp, and setup method. Expand each event to reveal more information:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Received Pixel ID:"})," Your Pixel ID"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Conversion ID:"})," The event\u2019s unique ID, used for ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/event-deduplication",children:"event deduplication"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/about-match-keys",children:(0,t.jsx)(n.strong,{children:"Match keys"})}),(0,t.jsx)(n.strong,{children:":"})," Shared user or device identifiers"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/about-event-metadata",children:(0,t.jsx)(n.strong,{children:"Metadata"})}),(0,t.jsx)(n.strong,{children:":"})," More details relevant for the event"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Referrer URL:"})," The page URL where the event is firing on"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["If you don\u2019t see an event or you see an issue, the event was improperly configured. This means that the action may not be firing, which will affect your analytics. We strongly recommend ",(0,t.jsx)(n.a,{href:"#4-troubleshooting-errors",children:"troubleshooting errors"})," as soon as possible. You can hover over issues to see information on event misconfigurations."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Example of an error message",src:s(87627).A+"",width:"1600",height:"680"})}),"\n",(0,t.jsx)(n.h4,{id:"4-troubleshooting-errors",children:"4. Troubleshooting errors"}),"\n",(0,t.jsxs)(n.p,{children:["If any of your events have issues, you can review them in ",(0,t.jsx)(n.a,{href:"https://ads.reddit.com/events-manager/diagnostics",children:"Diagnostics"})," to view your most recent conversion event issues. Expand an issue to get more details and learn how to resolve it. If you decide not to fix it, select ",(0,t.jsx)(n.em,{children:"Ignore"})," to move it to the ",(0,t.jsx)(n.em,{children:"Ignored"})," tab. Issues may take up to 24 hours to clear after they've been resolved.\xa0"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Ignore issue",src:s(73497).A+"",width:"1600",height:"877"})}),"\n",(0,t.jsx)(n.p,{children:"See more information on errors and warnings by expanding each conversion event. You must resolve errors for your integration to work properly. Warnings should be resolved, but your integration will still work if left unresolved.\xa0"}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:["Diagnostics will not call out product metadata not passing. We strongly recommend using the ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/Reddit-Pixel-Helper-Chrome-extension",children:"Pixel Helper"})," to check that this type of metadata is being passed."]})}),"\n",(0,t.jsx)(n.h5,{id:"common-errors",children:"Common errors"}),"\n",(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Issue"}),(0,t.jsx)("th",{children:"Description"})]})}),(0,t.jsxs)("tbody",{children:[(0,t.jsxs)("tr",{id:"missing-currency",children:[(0,t.jsxs)("td",{children:["Metadata ",(0,t.jsx)("code",{children:"value"})," is provided, but ",(0,t.jsx)("code",{children:"currency"})," is missing"]}),(0,t.jsxs)("td",{children:[(0,t.jsx)("p",{children:"A value was provided without a currency. We\u2019ll try to default to your account's chosen currency if available. Otherwise, it will be left empty."}),(0,t.jsx)("p",{children:"Check that a currency is being passed to remove this error."})]})]}),(0,t.jsxs)("tr",{id:"duplicate-conversion-id",children:[(0,t.jsxs)("td",{children:["The same ",(0,t.jsx)("code",{children:"conversionId"})," was provided for too many events"]}),(0,t.jsxs)("td",{children:[(0,t.jsx)("p",{children:"The same conversion ID was provided for more than 100 events."}),(0,t.jsx)("p",{children:"Pass a unique conversion ID for distinct conversion events."})]})]}),(0,t.jsxs)("tr",{id:"invalid-conversion-id",children:[(0,t.jsxs)("td",{children:["Invalid ",(0,t.jsx)("code",{children:"conversionId"})," provided for event"]}),(0,t.jsxs)("td",{children:[(0,t.jsx)("p",{children:"An invalid conversion ID was provided for the event. Change the conversion ID to a value not equal to one of the following:"}),(0,t.jsxs)("ul",{children:[(0,t.jsx)("li",{children:(0,t.jsx)("code",{children:"Undef
1ined"})}),(0,t.jsx)("li",{children:(0,t.jsx)("code",{children:"Null"})}),(0,t.jsx)("li",{children:"Empty"}),(0,t.jsx)("li",{children:(0,t.jsx)("code",{children:"00000000-0000-0000-0000-000000000000"})})]})]})]}),(0,t.jsxs)("tr",{id:"invalid-uuid",children:[(0,t.jsx)("td",{children:"Invalid UUID"}),(0,t.jsxs)("td",{children:["An invalid UUID was provided for the event. Ensure the UUID is formatted like ",(0,t.jsx)("code",{children:"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"}),". Learn more about the ",(0,t.jsx)("a",{href:"https://datatracker.ietf.org/doc/html/rfc4122",target:"_blank",children:"standard GUID format"}),"."]})]}),(0,t.jsxs)("tr",{id:"invalid-phone-number",children:[(0,t.jsx)("td",{children:"Invalid phone number"}),(0,t.jsxs)("td",{children:["An invalid phone number was provided for the event. Ensure the phone number is formatted like ",(0,t.jsx)("code",{children:"+15554441234"}),"."]})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{id:"invalid-click-id",children:"Invalid click ID"}),(0,t.jsxs)("td",{children:["An invalid click ID was provided for the event. Ensure the number matches the one provided for ",(0,t.jsx)("code",{children:"rdt_cid"})," in the URL. ",(0,t.jsxs)("blockquote",{children:[(0,t.jsx)("strong",{children:"Tip:"})," Open your ad and select your destination URL to find your click ID. Learn more about ",(0,t.jsx)("a",{href:"https://business.reddithelp.com/s/article/Generate-a-Test-Ad-URL-link",target:"_blank",children:"generating test URLs"}),"."]})]})]}),(0,t.jsxs)("tr",{id:"placeholder-value",children:[(0,t.jsx)("td",{children:"Placeholder value provided"}),(0,t.jsxs)("td",{children:[(0,t.jsxs)("p",{children:["Placeholder values for ",(0,t.jsx)("a",{href:"https://business.reddithelp.com/s/article/about-match-keys#customer-match-keys",target:"_blank",children:"customer match keys"})," haven\u2019t been changed."]}),(0,t.jsx)("p",{children:"Replace these values or remove the parameters from your integration."})]})]}),(0,t.jsxs)("tr",{id:"invalid-data-processing-mode",children:[(0,t.jsx)("td",{children:"Invalid data processing mode provided for event"}),(0,t.jsxs)("td",{children:[(0,t.jsx)("p",{children:"An unsupported value was provided for the data processing mode."}),(0,t.jsxs)("p",{children:["Check that the data processing mode is set to ",(0,t.jsx)("a",{href:"https://business.reddithelp.com/s/article/Limited-Data-Use",target:"_blank",children:"LDU"}),"."]})]})]})]})]}),"\n",(0,t.jsx)(n.h5,{id:"common-warnings",children:"Common warnings"}),"\n",(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Issue"}),(0,t.jsx)("th",{children:"Description"})]})}),(0,t.jsxs)("tbody",{children:[(0,t.jsxs)("tr",{id:"event-not-supported",children:[(0,t.jsx)("td",{children:"Event not supported"}),(0,t.jsxs)("td",{children:["The event type provided isn\u2019t supported. Set one of our ",(0,t.jsx)("a",{href:"https://business.reddithelp.com/s/article/supported-conversion-events",target:"_blank",children:"supported events"}),"."]})]}),(0,t.jsxs)("tr",{id:"missing-custom-name",children:[(0,t.jsx)("td",{children:"Missing custom name"}),(0,t.jsx)("td",{children:"You\u2019ve set this event as a custom event, but haven\u2019t added a custom event name. Set a custom event name and try again."})]}),(0,t.jsxs)("tr",{id:"invalid-metadata",children:[(0,t.jsx)("td",{children:"Invalid metadata"}),(0,t.jsxs)("td",{children:[(0,t.jsxs)("p",{children:["Check that you\u2019re passing ",(0,t.jsx)("a",{href:"https://business.reddithelp.com/s/article/about-event-metadata",target:"_blank",children:"supported event metadata"})," and that values are in the right format:"]}),(0,t.jsxs)("ul",{children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Item count:"})," integer"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Value:"})," number"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Currency:"})," string that matches a 3-letter currency code"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Conversion ID:"})," string"]})]})]})]}),(0,t.jsxs)("tr",{id:"currency-mismatch",children:[(0,t.jsx)("td",{children:"Currency doesn\u2019t match your account\u2019s currency"}),(0,t.jsx)("td",{children:"The currency doesn\u2019t match your account\u2019s currency. Check that the event currency matches your account's currency."})]}),(0,t.jsxs)("tr",{id:"currency-without-value",children:[(0,t.jsx)("td",{children:"Currency was provided without a value"}),(0,t.jsx)("td",{children:"Currency was provided, but a value is missing. Check that value metadata is being passed."})]}),(0,t.jsxs)("tr",{id:"invalid-email",children:[(0,t.jsx)("td",{children:"Invalid email"}
1),(0,t.jsxs)("td",{children:["The email provided is invalid or equal to the email of your ad account. Ensure the email is formatted like ",(0,t.jsx)("code",{children:(0,t.jsx)(n.a,{href:"mailto:[email protected]",children:"[email protected]"})}),"."]})]}),(0,t.jsxs)("tr",{id:"product-not-in-catalog",children:[(0,t.jsx)("td",{children:"Product not in catalog"}),(0,t.jsx)("td",{children:"The provided product ID doesn\u2019t match a product in your catalog. Ensure that this ID can be found in your catalog."})]}),(0,t.jsxs)("tr",{id:"missing-integration-type",children:[(0,t.jsx)("td",{children:"Missing integration type"}),(0,t.jsxs)("td",{children:["Your 1x1 Image Pixel is missing its integration type. Add ",(0,t.jsx)("code",{children:"integration=noscript"})," to your implementation."]})]}),(0,t.jsxs)("tr",{id:"invalid-integration-type",children:[(0,t.jsx)("td",{children:"Invalid integration type"}),(0,t.jsxs)("td",{children:["Your 1x1 Image Pixel is using an invalid integration type. Ensure ",(0,t.jsx)("code",{children:"integration"})," is set to ",(0,t.jsx)("code",{children:"noscript"}),"."]})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"post-get-a-report",children:(0,t.jsx)(n.code,{children:"POST Get a report"})}),"\n",(0,t.jsxs)(n.p,{children:["Get a report for a custom conversion event by requesting ",(0,t.jsx)(n.code,{children:"conversion_custom_event_{{index}}_{{field}}"})," in fields for ",(0,t.jsx)(n.code,{children:"POST Get a report"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"Reporting returns conversion data based on the attribution window selected in the Ads Manager."})}),"\n",(0,t.jsx)(n.h4,{id:"1-fix-the-index-mapping",children:"1. Fix the index mapping"}),"\n",(0,t.jsxs)(n.p,{children:["Call ",(0,t.jsx)(n.code,{children:"GET Last Fired At"})," and use ",(0,t.jsx)(n.code,{children:"custom_events"})," in the response to map custom event labels. If your fields are valid, you\u2019ll receive a response like this:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-JSON",children:'{\n "data": {\n // Additional fields here\n "custom_events": [\n {\n "last_fired_at": "2024-03-12T00:58:29.862000+00:00",\n "name": "my_custom_conversion_event"\n },\n {\n "last_fired_at": "2024-03-11T19:03:32+00:00",\n "name": "begin_checkout"\n },\n {\n "last_fired_at": "2024-03-12T00:59:05.981000+00:00",\n "name": "login"\n },\n {\n "last_fired_at": "2024-03-11T08:03:41.323000+00:00",\n "name": "select_item"\n },\n {\n "last_fired_at": "2024-03-10T23:36:53.844000+00:00",\n "name": "share"\n }\n ]\n }\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The custom conversion events will be listed by their index in ascending order, starting with 1. For example, the first conversion event will have an index of ",(0,t.jsx)(n.code,{children:"1"}),"."]}),"\n",(0,t.jsx)(n.h4,{id:"2-get-the-report-for-a-custom-event",children:"2. Get the report for a custom event"}),"\n",(0,t.jsxs)(n.p,{children:["Fetch data for custom conversion events by calling ",(0,t.jsx)(n.code,{children:"POST Get a report"})," and setting ",(0,t.jsx)(n.code,{children:"conversion_custom_event_{{index}}_{{field}}"})," for the field, where:"]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Parameter"}),(0,t.jsx)(n.th,{children:"Requirements"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"{{index}}"})," (integer)"]}),(0,t.jsx)(n.td,{children:"Between 1 and 20"}),(0,t.jsxs)(n.td,{children:["The slot for the custom conversion event. For example, if your event was the first item in the ",(0,t.jsx)(n.code,{children:"custom_events"})," array, you should set this to ",(0,t.jsx)(n.code,{children:"1"}),"."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"{{field}"})," (string)"]}),(0,t.jsxs)(n.td,{children:["Must include at least one of the following: ",(0,t.jsxs)("ul",{children:[(0,t.jsx)("li",{children:(0,t.jsx)(n.code,{children:"avg_value"})}),(0,t.jsx)("li",{children:(0,t.jsx)(n.code,{children:"clicks"})}),(0,t.jsx)("li",{children:(0,t.jsx)(n.code,{children:"ecpa"})}),(0,t.jsx)("li",{children:(0,t.jsx)(n.code,{children:"total_items"})}),(0,t.jsx)("li",{children:(0,t.jsx)(n.code,{children:"total_value"})}),(0,t.jsx)("li",{children:(0,t.jsx)(n.code,{children:"views"})})]})]}),(0,t.jsx)(n.td,{children:"The field that you want to be returned in your metrics."})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"For example, to return click and view conversions for custom conversion event 1:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-JSON",children:'{\n\xa0\xa0"data": {\n\xa0\xa0\xa0\xa0"fields": [\n\xa0\xa0\xa0\xa0\xa0\xa0"conversion_custom_event_1_clicks",\n\xa0"conversion_custom_event_1_views"\n\xa0\xa0\xa0\xa0],\n\xa0\xa0\xa0\xa0"starts_at": "2024-03-10T00:00:00Z",\n\xa0\xa0\xa0\xa0"ends_at": "2024-03-12T00:00:00Z"\n\xa0\xa0}\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:"Data will be returned in the same format as standard conversion events. If your event is
1well-formatted and your fields are valid, you\u2019ll receive a response like this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'{\n\xa0\xa0\xa0\xa0"data": {\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"metrics": [\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0{\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"conversion_purchase_clicks": 7,\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"conversion_purchase_views": 0,\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"conversion_custom_event_1_clicks": 56,\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"conversion_custom_event_1_views": 0,\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"conversion_custom_event_3_clicks": 36,\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"conversion_custom_event_3_views": 0\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0}\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0]\n\xa0\xa0\xa0\xa0},\n\xa0\xa0\xa0\xa0"pagination": {\n\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0// Additional fields here\n\xa0\xa0\xa0\xa0}\n}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"error-handling",children:"Error handling"}),"\n",(0,t.jsx)(n.h3,{id:"general-errors",children:"General errors"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Error"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Solution"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"400 - Bad Request"})}),(0,t.jsx)(n.td,{children:"User attempted to send invalid conversion events."}),(0,t.jsx)(n.td,{children:"Check your event setup and try again. See the client error message for specifics."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"403 - Blocked"})}),(0,t.jsx)(n.td,{children:"Insufficient authentication scopes or the user doesn\u2019t have permission. Your app doesn\u2019t have the proper scope for this request."}),(0,t.jsxs)(n.td,{children:["Check your access token and ensure you have the right permissions assigned for this action.If you\u2019re using a developer access token, apply at least ",(0,t.jsx)(n.code,{children:"adsconversions"})," to your scope."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"404 - Not found"})}),(0,t.jsx)(n.td,{children:"The target account is invalid and can\u2019t be found. This commonly happens if an incorrect Pixel ID is being used."}),(0,t.jsx)(n.td,{children:"Check your Pixel ID in the API request."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"API does not specify timezone"})}),(0,t.jsx)(n.td,{children:"The timezone hasn\u2019t been specified. Data is returned in Universal Coordinated Time (UTC)."}),(0,t.jsx)(n.td,{children:"To specify a timezone, adjust the time offset in the date range."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"AdvertiserID {{Pixel ID}} is not authorized to post conversions to accountID {{Member ID}}"})}),(0,t.jsx)(n.td,{children:"Your member ID isn\u2019t authorized and isn\u2019t showing up as a Reddit Ads account, which can happen when you\u2019re not passing a bearer token in the request."}),(0,t.jsx)(n.td,{children:"Double-check that you\u2019re passing tokens properly."})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"401-errors",children:(0,t.jsx)(n.strong,{children:"401 errors"})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Error"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Solution"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"Unauthorized"})}),(0,t.jsx)(n.td,{children:"The user is trying to authorize with the wrong username or the account isn\u2019t whitelisted."}),(0,t.jsxs)(n.td,{children:["Log out and log in to the correct account. If that doesn\u2019t resolve the issue, contact your ",(0,t.jsx)(n.a,{href:"https://www.business.reddit.com/advertise#managed-services",children:"Reddit Ads expert"})," to whitelist your account."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"unsupported_grant_type"})}),(0,t.jsx)(n.td,{children:"Incorrect syntax was used."}),(0,t.jsxs)(n.td,{children:["Ensure a valid ",(0,t.jsx)(n.code,{children:"grant_type"})," parameter is present.\xa0If that doesn\u2019t solve the issue, check the cURL command and encoding method. For example, double quotes must be used around ",(0,t.jsx)(n.code,{children:"grant_type"})," and code in the cURL command."]})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"429-errors---too-many-requests",children:"429 errors - Too many requests"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Solution"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"Your user agent was automatically ratelimited."})}),(0,t.jsxs)(n.td,{children:["Set your requests\u2019 user agent header (",(0,t.jsx)(n.code,{children:"user-agent"}),") to a unique and descriptive string."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"You\u2019ve reached the ratelimit for the endpoint."})}),(0,t.jsx)(n.td,{children:"Cache data retrieved locally or store the data in a database to avoid polling the API. If you need to backfill data, consider sending data in batches. For example, if pulling data for the last six months, request one month\u2019s worth of data in each API request.Alternatively, set a retry logic and limit the amount of retries by implementing exponential backoff."})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"500-errors",children:"500 errors"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Error"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Solution"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"This advertiser is not allowed to perform this action"})}),(0,t.jsx)(n.td,{children:"User hasn\u2019t accepted an invitation to the account or the user has not been added to the account."}),(0,t.jsxs)(n.td,{children:["Accept the invitation to the business account in ",(0,t.jsx)(n.em,{children:"Business > Members"}),". If you don\u2019t see an invite: ",(0,t.jsxs)("ul",{children:[(0,t.jsxs)("li",{children:[(0,t.jsx)(n.strong,{children:"Request access:"})," Tell an administrator of your business to invite you.\xa0"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)(n.strong,{children:"Add the account:"})," In ",(0,t.jsx)(n.em,{children:"Business > Members"}),", select ",(0,t.jsx)(n.em,{children:"Add"})," and search for the account by name or ID then select ",(0,t.jsx)(n.em,{children:"administrator"})," for your role."]})]})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"Could not verify authorization"})}),(0,t.jsx)(n.td,{children:"The API request specifies a member ID, instead of a business Pixel ID."}),(0,t.jsxs)(n.td,{children:["Ensure the ID matches the Pixel ID. You can find your Pixel ID in the ",(0,t.jsx)(n.a,{href:"https://ads.reddit.com/events-manager",children:"Events Manager"}),", and it should match the business account's Pixel ID found in ",(0,t.jsx)(n.a,{href:"https://ads.reddit.com/accounts",children:"Accounts"}),"."]})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"best-practices",children:"Best practices"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Stay within the rate limits."})," You\u2019re limited to 1,000 requests/second, 1,000 events/request, and 10,000 events/second."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Set a descriptive user agent."}),' Many default user agents (like "Python/urllib" or "Java") are drastically limited to encourage unique and descriptive user agent strings. Make sure the user agent string in y
1our requests is unique and descriptive. We recommend including the target platform, a unique application identifier, a version string, and your username as contact information, in the following format: ',(0,t.jsx)(n.code,{children:"<platform>:<app ID>:<version string> (by /u/<reddit username>)"}),". Here\u2019s an example: ",(0,t.jsx)(n.code,{children:"User-Agent: android:com.example.myredditapp:v1.2.3 (by /u/anagtest)"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.em,{children:"Never"})," lie about your user agent! This includes spoofing popular browsers and spoofing other bots. We ban liars with extreme prejudice."]})}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsx)(n.p,{children:"Include the version number and update it as you build your application. This helps us safely block old buggy or broken versions of your app."})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Use the Conversions API and Reddit Pixel together."})," This will improve conversion coverage, maximize campaign performance, and power better targeting and optimization tools. Your measurement will be more resilient and adaptable to the shifting advertising landscape.\xa0"]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"#set-up-deduplication",children:"Event deduplication"})," is required for advertisers using both the Reddit Pixel and Conversions API."]})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Share as many matching signals as possible."})," ",(0,t.jsx)(n.a,{href:"#attribution-matching",children:"Match keys"})," are crucial to help attribute conversions to a Reddit ad engagement. These signals can be shared unhashed or pre-hashed. We strongly recommend sharing the IP address and click ID and suggest including the email address and user agent. If you\u2019re integrating CAPI with the Pixel, we recommend sharing UUID."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Set an accurate action source."})," The ",(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/omni-attribution",children:(0,t.jsx)(n.em,{children:"action source"})})," identifies whether a conversion happened online, offline, or through another channel. Provide the correct source and its relevant match keys for accurate attribution and metric breakdowns. For example, ",(0,t.jsx)(n.code,{children:"PHYSICAL_STORE"})," events should not send device matching identifiers, click ID, UUID, or MAIDs."]}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/event-deduplication",children:"Event deduplication"})," only applies for events in the same channel."]})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Pass external ID when possible."})," ",(0,t.jsx)(n.em,{children:(0,t.jsx)(n.a,{href:"https://business.reddithelp.com/s/article/about-match-keys#customer-match-keys-and-identifiers",children:"External ID"})})," helps improve attribution accuracy for events from all action sources. We recommend passing an external ID that is unique to a single user."]}),"\n"]}),"\n"]}),"\n","\n",(0,t.jsx)(d.A,{items:(0,o.useCurrentSidebarCategory)().items})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(u,{...e})}):u(e)}},49338:(e,n,s)=>{"use strict";s.d(n,{A:()=>i});const i=s.p+"assets/images/generate-token-ab4cd6ae93aa510d6db86998a675a5c9.webp"},51402:e=>{e.exports={stripMarkdownForPlainText:function(e){if(null==e||"string"!=typeof e)return e;let n=e;return n=n.replace(/!\[([^\]]*)\]\([^)]+\)/g,"$1"),n=n.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),n=n.replace(/\*\*([\s\S]*?)\*\*/g,"$1"),n=n.replace(/__([\s\S]*?)__/g,"$1"),n=n.replace(/`([^`]+)`/g,"$1"),n=n.replace(/~~([^~]+)~~/g,"$1"),n=n.replace(/\*([^*]+)\*/g,"$1"),n=n.replace(/_([^_]+)_/g,"$1"),n.replace(/\s+/g," ").trim()}}},57888:(e,n,s)=>{"use strict";s.d(n,{A:()=>i});const i=s.p+"assets/images/triggered-events-9b235b51bccd9566ce367b1d3250ae03.webp"},73497:(e,n,s)=>{"use strict";s.d(n,{A:()=>i});const i=s.p+"assets/images/ignore-issue-490378bab213e6b8ead69d9da1b594a2.webp"},76913:(e,n,s)=>{"use strict";s.d(n,{A:()=>i});const i=s.p+"assets/images/copy-pixel-id-a35c19bd86a240ea2bb19607a8ddbdff.webp"},87627:(e,n,s)=>{"use strict";s.d(n,{A:()=>i});const i=s.p+"assets/images/example-issue-085b65083fc4a391466c32b13be97f6c.webp"},89553:(e,n,s)=>{"use strict";s.d(n,{A:()=>i});const i=s.p+"assets/images/copy-access-token-ded139742abcc9eab1a059084fe6b189.webp"},94687:(e,n,s)=>{"use strict";s.d(n,{A:()=>g});s(96540);var i=s(34164),t=s(28774),r=s(26972),d=s(53465),o=s(16654),a=s(21312),c=s(51107);const l={cardContainer:"cardContainer_S8oU",cardTitle:"cardTitle_HoSo",cardDescription:"cardDescription_c27F"};var h=s(86856),u=s(51402),p=s(74848);function x({className:e,href:n,children:s}){return(0,p.jsx)(t.default,{href:n,className:(0,i.A)("card padding--lg",l.cardContainer,e),children:s})}function m({className:e,href:n,icon:s,title:t,description:r}){return(0,p.jsxs)(x,{href:n,className:e,children:[(0,p.jsxs)(c.default,{as:"h2",className:(0,i.A)("text--truncate",l.cardTitle),title:t,children:[s," ",t]}),r&&(0,p.jsx)("p",{className:(0,i.A)("text--truncate",l.cardDescription),title:r,children:r})]})}function j({item:e}){const n=(0,r.Nr)(e),s=function(){const{selectMessage:e}=(0,d.W)();return n=>e(n,(0,a.translate)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:n}))}();if(!n)return null;const i=e.description??s(e.items.length);return(0,p.jsx)(m,{className:e.className,href:n,icon:(0,p.jsx)(h.Ay,{glyph:"collection",label:"",size:"md"}),title:e.label,description:(0,u.stripMarkdownForPlainText)(i)})}function v({item:e}){const n=(0,o.A)(e.href)?(0,p.jsx)(h.Ay,{glyph:"document",label:"",size:"md"}):(0,p.jsx)(h.Ay,{glyph:"link",label:"",size:"md"}),s=(0,r.cC)(e.docId??void 0),i=e.description??s?.description;return(0,p.jsx)(m,{className:e.className,href:e.href,icon:n,title:e.label,description:(0,u.stripMarkdownForPlainText)(i)})}function g({item:e}){switch(e.type){case"link":return(0,p.jsx)(v,{item:e});case"category":return(0,p.jsx)(j,{item:e});default:throw new Error(`unknown item type ${JSON.stringify(e)}`)}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.