marketing snippet should be able to log multiple marking links #2338
Comments
|
I propose to log something like the following snippet as part of the metrics that are sent to the /metrics endpoint: ...
marketing: [
{
id: 'android-sync',
url: 'https://play.google.com/somebiglongscarylink',
clicked: false
},
{
id: 'hello',
url: 'https://hello.firefox.com',
clicked: true
}
],
...This would give us the ability to log an arbitrary number of marketing items, potentially across multiple screens. |
|
cc @kparlante |
|
@kparlante's feedback in dev-fxaccount:
|
|
More feedback from @kparlante in dev-fxaccount:
|
@kparlante - I want to dig in here. If I understand your proposal, multiple messages would be logged for marketing data. One message would be the marketing data as is currently formatted. The new message(s) would be individual entries, one for each marketing URL. Each marketing entry would contain each of the three fields mentioned. e.g.: {"time":"2015-05-07T13:00:00.000Z","op":"client.metrics","pid":27573,"v":1,"lang":"en",...}
{"campaignId":"spring-2015-android-ios-sync","url":"https://www.mozilla.org/newsletter/ios/","clicked":true,"time":"2015-05-07T13:00:00.000Z","op":"client.marketing","hostname":"Shanes-Retina-MBP.local","pid":30856,"v":1}The first entry is the marketing entry as we have always had, the second is an individual marketing impression with the extra meta-data added. I specify an op of Is this along the lines of what you were thinking of? |
* Extract the marketing link handling code into its own mixin module.
* The call to POST /metrics contains a `marketing` field.
* `marketing` contains `campaignId`, `url`, and `clicked`.
* Marketing impressions are reported to Heka separately from the rest of the metrics.
An example marketing entry:
{"campaignId":"spring-2015-android-ios-sync","url":"https://www.mozilla.org/newsletter/ios/","clicked":true,"time":"2015-05-07T13:00:00.000Z","op":"client.marketing","hostname":"Shanes-Retina-MBP.local","pid":30856,"v":1}
fixes #2338
|
@shane-tomlinson : yes, that was what I was thinking. You may want to add a few segmentation fields to the "client.marketing" entry, in particular |
* Extract the marketing link handling code into its own mixin module.
* The call to POST /metrics contains a `marketing` field.
* `marketing` contains `campaignId`, `url`, and `clicked`.
* Marketing impressions are reported to Heka separately from the rest of the metrics.
An example marketing entry:
{"campaignId":"spring-2015-android-ios-sync","url":"https://www.mozilla.org/newsletter/ios/","clicked":true,"time":"2015-05-07T13:00:00.000Z","op":"client.marketing","hostname":"Shanes-Retina-MBP.local","pid":30856,"v":1}
fixes #2338
* Extract the marketing link handling code into its own mixin module.
* The call to POST /metrics contains a `marketing` field.
* `marketing` contains `campaignId`, `url`, and `clicked`.
* Marketing impressions are reported to Heka separately from the rest of the metrics.
An example marketing entry:
{"campaignId":"spring-2015-android-ios-sync","url":"https://www.mozilla.org/newsletter/ios/","clicked":false,"time":"2015-05-11T13:00:00.000Z","op":"client.marketing","hostname":"Shanes-Retina-MBP.local","pid":64280,"v":1,"lang":"en","agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:40.0) Gecko/20100101 Firefox/40.0","context":"web","entrypoint":"none","service":"sync","migration":"none"}
fixes #2338
* Extract the marketing link handling code into its own mixin module.
* The call to POST /metrics contains a `marketing` field.
* `marketing` contains `campaignId`, `url`, and `clicked`.
* Marketing impressions are reported to Heka separately from the rest of the metrics.
An example marketing entry:
{"campaignId":"spring-2015-android-ios-sync","url":"https://www.mozilla.org/newsletter/ios/","clicked":false,"time":"2015-05-11T13:00:00.000Z","op":"client.marketing","hostname":"Shanes-Retina-MBP.local","pid":64280,"v":1,"lang":"en","agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:40.0) Gecko/20100101 Firefox/40.0","context":"web","entrypoint":"none","service":"sync","migration":"none"}
fixes #2338
* Extract the marketing link handling code into its own mixin module.
* The call to POST /metrics contains a `marketing` field.
* a `marketing` entry contains `campaignId`, `url`, and `clicked`.
* Marketing impressions are reported to Heka separately from the rest of the metrics.
An example marketing entry for Heka:
{"campaignId":"spring-2015-android-ios-sync","url":"https://www.mozilla.org/newsletter/ios/","clicked":false,"time":"2015-05-11T13:00:00.000Z","op":"client.marketing","hostname":"Shanes-Retina-MBP.local","pid":64280,"v":1,"lang":"en","agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:40.0) Gecko/20100101 Firefox/40.0","context":"web","entrypoint":"none","service":"sync","migration":"none"}
* Marketing impressions are reported to StatsD using the `marketing.impression` counter. An impression's tags contain 3 additional fields: `campaignId`, `url` and `clicked`.
* An example marketing entry for StatsD:
fxa.content.marketing.impression:1|c|#campaign:none,context:web,broker:fx-desktop-v1,entrypoint:none,migration:none,lang:en,service:none,screen_client_width:819,screen_client_height:955,screen_device_pixel_ratio:2,screen_width:1680,screen_height:1050,agent_ua_name:Chrome 42.0.2311,agent_ua_family:Chrome,agent_ua_version:42.0.2311,agent_ua_version_major:42,agent_os_name:Mac OS X 10.10.3,agent_os_version:10.10.3,agent_os_family:Mac OS X,agent_os_major:10,agent_device:Other,marketing_campaignId:spring_2015,marketing_url:https://play.google.com/fx_for_android,marketing_clicked:true
fixes #2338
* Extract the marketing link handling code into its own mixin module.
* The call to POST /metrics contains a `marketing` field.
* a `marketing` entry contains `campaignId`, `url`, and `clicked`.
* Marketing impressions are reported to Heka separately from the rest of the metrics.
An example marketing entry for Heka:
{"campaignId":"spring-2015-android-ios-sync","url":"https://www.mozilla.org/newsletter/ios/","clicked":false,"time":"2015-05-11T13:00:00.000Z","op":"client.marketing","hostname":"Shanes-Retina-MBP.local","pid":64280,"v":1,"lang":"en","agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:40.0) Gecko/20100101 Firefox/40.0","context":"web","entrypoint":"none","service":"sync","migration":"none"}
* Marketing impressions are reported to StatsD using the `marketing.impression` counter. An impression's tags contain 3 additional fields: `marketing_campaign_id`, `marketing_url` and `marketing_clicked`.
* An example marketing entry for StatsD:
fxa.content.marketing.impression:1|c|#campaign:none,context:web,broker:fx-desktop-v1,entrypoint:none,migration:none,lang:en,service:none,screen_client_width:819,screen_client_height:955,screen_device_pixel_ratio:2,screen_width:1680,screen_height:1050,agent_ua_name:Chrome 42.0.2311,agent_ua_family:Chrome,agent_ua_version:42.0.2311,agent_ua_version_major:42,agent_os_name:Mac OS X 10.10.3,agent_os_version:10.10.3,agent_os_family:Mac OS X,agent_os_major:10,agent_device:Other,marketing_campaign_id:spring_2015,marketing_url:https://play.google.com/fx_for_android,marketing_clicked:true
fixes #2338
* Extract the marketing link handling code into its own mixin module.
* The call to POST /metrics contains a `marketing` field.
* a `marketing` entry contains `campaignId`, `url`, and `clicked`.
* Marketing impressions are reported to Heka separately from the rest of the metrics.
An example marketing entry for Heka:
{"campaignId":"spring-2015-android-ios-sync","url":"https://www.mozilla.org/newsletter/ios/","clicked":false,"time":"2015-05-11T13:00:00.000Z","op":"client.marketing","hostname":"Shanes-Retina-MBP.local","pid":64280,"v":1,"lang":"en","agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:40.0) Gecko/20100101 Firefox/40.0","context":"web","entrypoint":"none","service":"sync","migration":"none"}
* Marketing impressions are reported to StatsD using the `marketing.impression` counter. An impression's tags contain 3 additional fields: `marketing_campaign_id`, `marketing_url` and `marketing_clicked`.
* An example marketing entry for StatsD:
fxa.content.marketing.impression:1|c|#campaign:none,context:web,broker:fx-desktop-v1,entrypoint:none,migration:none,lang:en,service:none,screen_client_width:819,screen_client_height:955,screen_device_pixel_ratio:2,screen_width:1680,screen_height:1050,agent_ua_name:Chrome 42.0.2311,agent_ua_family:Chrome,agent_ua_version:42.0.2311,agent_ua_version_major:42,agent_os_name:Mac OS X 10.10.3,agent_os_version:10.10.3,agent_os_family:Mac OS X,agent_os_major:10,agent_device:Other,marketing_campaign_id:spring_2015,marketing_url:https://play.google.com/fx_for_android,marketing_clicked:true
fixes #2338
Currently we only allow one link to be logged. The 38.1 FxiOS snippet can have 2 links, both of which should be logged.
Ref #2316
The text was updated successfully, but these errors were encountered: