You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: prebid/native-implementation.md
+2-44Lines changed: 2 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -633,11 +633,11 @@ According to the [OpenRTB spec](https://www.iab.com/wp-content/uploads/2018/03/O
633
633
634
634
When native ad is rendered prebid universal creative will attach `click` listeners on all DOM elements that have class `pb-click`. Which means it's up to the publisher to decide which DOM objects are 'clickable'.
635
635
636
-
Furthermore, prebid universal creative can also track if some specific asset is clicked. To enable this, publisher needs to assign custom attribute to associated DOM element: `hb_native_asset_id = "5"`. In that case if user clicks on asset with `id: 5` prebid universal creative will take `link` object from that asset and fire all click trackers. If asset doesn't have `link` object, prebid universal creative will fire all click trackers associated with 'master' `link` object (as described in openRTB specs).
636
+
Furthermore, prebid universal creative can also track if some specific asset is clicked. To enable this, publisher needs to assign custom attribute to associated DOM element: `hb_native_asset_id="5"`. In that case if user clicks on asset with `id: 5` prebid universal creative will take `link` object from that asset and fire all click trackers. If asset doesn't have `link` object, prebid universal creative will fire all click trackers associated with 'master' `link` object (as described in openRTB specs).
637
637
638
638
639
639
```html
640
-
<divclass="pb-click"hb_native_asset_id = "5">
640
+
<divclass="pb-click"hb_native_asset_id="5">
641
641
```
642
642
If the user clicks on this div, the Prebid Universal Creative will take the `link` object from the identified asset and fire any click trackers. If the asset doesn't have a `link` object, it will just fire the click trackers associated with 'master' `link` object.
643
643
@@ -653,48 +653,6 @@ Example of how to configure a template so that the Prebid Universal Creative can
653
653
</div>
654
654
```
655
655
656
-
### 6.3. Viewability Tracking
657
-
In order for viewability tracking to work, there needs to be a script on `window.top` that is tracking if the ad's iframe is viewable or not. Also, this script needs to communicate with Prebid.js so that appropriate trackers are fired when the ad is viewable.
658
-
659
-
To minimize needed work on the publisher side, we recommend using the [Prebid.js Viewability module](https://github.com/prebid/Prebid.js/blob/master/modules/viewability.md).
660
-
661
-
Enabling viewability tracking for native ads:
662
-
- Build your Prebid.js bundle with the `viewability` module
663
-
- Use the [Custom Renderer scenario](#43-implementing-the-custom-renderer-scenario) and add the following code to the `window.renderAd` function:
664
-
665
-
```javascript
666
-
window.renderAd= (bid) => {
667
-
const {ortb} = bid;
668
-
// code that generates the native ad based on a template and ortb response should remain the same
669
-
...
670
-
671
-
// send post message for viewability module to track and fire appropriate trackers
672
-
if (ortb.eventtrackers) {
673
-
// filter for "viewable-mrc50" and "viewable-mrc100"
There are detailed [instructions for setting up native in GAM](/adops/gam-native.html), but none of the Prebid functionality is specific to GAM. The requirements to use any of these approaches in a different ad server are:
0 commit comments