1"use strict";(self.webpackChunkexperimenter_docs=self.webpackChunkexperimenter_docs||[]).push([[8798],{4137:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(7294);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,r,s=function(e,t){if(null==e)return{};var n,r,s={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,s=e.mdxType,a=e.originalType,l=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),c=p(n),g=s,f=c["".concat(l,".").concat(g)]||c[g]||m[g]||a;return n?r.createElement(f,i(i({ref:t},u),{},{components:n})):r.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var a=n.length,i=new Array(a);i[0]=g;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[c]="string"==typeof e?e:s,i[1]=o;for(var p=2;p<a;p++)i[p]=n[p];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}g.displayName="MDXCreateElement"},3095:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>o,toc:()=>p});var r=n(7462),s=(n(7294),n(4137));const a={id:"message-configuration",title:"Configuration & Frequency",slug:"/messaging/desktop/message-configuration",sidebar_position:3},i=void 0,o={unversionedId:"messaging/desktop/message-configuration",id:"messaging/desktop/message-configuration",title:"Configuration & Frequency",description:"Configuration options for controlling how and when messages are displayed to users.",source:"@site/docs/messaging/desktop/message-configuration.md",sourceDirName:"messaging/desktop",slug:"/messaging/desktop/message-configuration",permalink:"/messaging/desktop/message-configuration",draft:!1,editUrl:"https://github.com/mozilla/experimenter-docs/edit/main/docs/messaging/desktop/message-configuration.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{id:"message-configuration",title:"Configuration & Frequency",slug:"/messaging/desktop/message-configuration",sidebar_position:3},sidebar:"sidebar",previous:{title:"Display Logic",permalink:"/messaging/desktop/display-logic"},next:{title:"Message Lifecycle",permalink:"/messaging/desktop/message-lifecycle"}},l={},p=[{value:"Frequency Caps",id:"frequency-caps",level:2},{value:"Message Frequency",id:"message-frequency",level:3},{value:"Lifetime",id:"lifetime",level:4},{value:"Frequency",id:"frequency",level:4},{value:"Example Configuration",id:"example-configuration",level:4},{value:"Groups & Campaigns",id:"groups--campaigns",level:2},{value:"Message Groups",id:"message-groups",level:3},{value:"Campaigns",id:"campaigns",level:3}],u={toc:p},c="wrapper";function m({components:e,...t}){return(0,s.kt)(c,(0,r.Z)({},u,t,{components:e,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"Configuration options for controlling how and when messages are displayed to users."),(0,s.kt)("h2",{id:"frequency-caps"},"Frequency Caps"),(0,s.kt)("h3",{id:"message-frequency"},"Message Frequency"),(0,s.kt)("p",null,"How often and how many times a user should see a message is configured through frequency."),(0,s.kt)("p",null,"The following characteristics can be configured:"),(0,s.kt)("h4",{id:"lifetime"},"Lifetime"),(0,s.kt)("p",null,"How many times a message gets shown to the user before it is permanently blocked."),(0,s.kt)("h4",{id:"frequency"},"Frequency"),(0,s.kt)("p",null,"How much time to allow between consecutive impressions. After a message is shown once it can be configured to be ",(0,s.kt)("strong",{parentName:"p"},"temporarily")," blocked for a period of time in order to not show it too often."),(0,s.kt)("p",null,"This capability is highly configurable allowing to specify multiple constraints for example:"),(0,s.kt)("ul",null,(0,s.kt)("li",{parentName:"ul"},"show it at most 3 times per week"),(0,s.kt)("li",{parentName:"ul"},"but not more than 1 per day")),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-json"},"[\n {\n cap: 1,\n period: 86400000 // Max 1 per day\n },\n {\n cap: 3,\n period: 86400000 * 7 // Max 3 per week\n }\n]\n")),(0,s.kt)("h4",{id:"example-configuration"},"Example Configuration"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-json"},"frequency: {\n custom: [\n {\n cap: 1, // How many times\n period: 60480000 // Time in ms\n }\n ],\n lifetime: 10 // Show it at most 10 times\n}\n")),(0,s.kt)("hr",null),(0,s.kt)("h2",{id:"groups--campaigns"},"Groups & Campaigns"),(0,s.kt)("h3",{id:"message-groups"},"Message Groups"),(0,s.kt)("p",null,"There is the possibility to make further fine grained configuration that can set impression limits between multiple messages."),(0,s.kt)("p",null,"Example: we have two messages using 2 different messaging surfaces but the messages have a similar theme or content. We can use the ",(0,s.kt)("strong",{parentName:"p"},"groups")," field in the message configuration to point two separate messages to the same frequency and lifetime configuration. When multiple messages point to the same group configuration any impression from one of the messages counts against the total allowed for the group. If the group frequency is set to 1 per day then whichever message is shown first will prevent all the other messages in the group from appearing for the next 24 hours. When a single message is part of multiple groups, it will not display if either of the groups would not display (i.e. is disabled by preference or frequency capped)."),(0,s.kt)("h3",{id:"campaigns"},"Campaigns"),(0,s.kt)("p",null,'Campaigns are similar to groups but are used to block messages. If two messages reference the same campaign, blocking any of the messages will prevent the others from ever showing up. This was implemented for snippets, and as of December 22 2022, that is the only place they have been used. For example, all snippets mentioning "FxA accounts" would be grouped together in the same campaign. Block one snippet and it blocks the entire campaign.'))}m.isMDXComponent=!0}}]);
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.