Bug 1529730 - Impression capping for spocs on hero
authorScott <scott.downe@gmail.com>
Wed, 27 Feb 2019 23:31:15 +0200
changeset 516178 2c312025ce11e2d86c9c431ad84332de8b4816df
parent 516177 59045592dda92ee21d37e272d6a30f35ee74e65b
child 516179 ab901cb2baa5ef1983a18a2c91d4a9b78ea8c313
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1529730
milestone66.0
Bug 1529730 - Impression capping for spocs on hero Reviewers: k88hudson Reviewed By: k88hudson Subscribers: reviewbot Bug #: 1529730 Differential Revision: https://phabricator.services.mozilla.com/D20961
browser/components/newtab/content-src/components/DiscoveryStreamComponents/Hero/Hero.jsx
browser/components/newtab/data/content/activity-stream.bundle.js
--- a/browser/components/newtab/content-src/components/DiscoveryStreamComponents/Hero/Hero.jsx
+++ b/browser/components/newtab/content-src/components/DiscoveryStreamComponents/Hero/Hero.jsx
@@ -38,16 +38,17 @@ export class Hero extends React.PureComp
     }
 
     let [heroRec, ...otherRecs] = data.recommendations.slice(0, this.props.items);
     this.heroRec = heroRec;
 
     // Note that `{index + 1}` is necessary below for telemetry since we treat heroRec as index 0.
     let cards = otherRecs.map((rec, index) => (
       <DSCard
+        campaignId={rec.campaign_id}
         key={`dscard-${index}`}
         image_src={rec.image_src}
         title={rec.title}
         url={rec.url}
         id={rec.id}
         index={index + 1}
         type={this.props.type}
         dispatch={this.props.dispatch}
--- a/browser/components/newtab/data/content/activity-stream.bundle.js
+++ b/browser/components/newtab/data/content/activity-stream.bundle.js
@@ -7481,16 +7481,17 @@ class Hero_Hero extends external_React_d
       return external_React_default.a.createElement("div", null);
     }
 
     let [heroRec, ...otherRecs] = data.recommendations.slice(0, this.props.items);
     this.heroRec = heroRec;
 
     // Note that `{index + 1}` is necessary below for telemetry since we treat heroRec as index 0.
     let cards = otherRecs.map((rec, index) => external_React_default.a.createElement(DSCard_DSCard, {
+      campaignId: rec.campaign_id,
       key: `dscard-${index}`,
       image_src: rec.image_src,
       title: rec.title,
       url: rec.url,
       id: rec.id,
       index: index + 1,
       type: this.props.type,
       dispatch: this.props.dispatch,