native1

package
v19.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 0 Imported by: 4

README

native1 GoDoc

OpenRTB Dynamic Native Ads API 1.2 section "7 Reference Lists/Enumerations" types for Go programming language

See request for section "4 Native Ad Request Markup Details" and response for section "5 Native Ad Response Markup Details".

Documentation

Overview

Package native1 provides OpenRTB Native 1.2 enums (section "7 Reference Lists/Enumerations")

https://iabtechlab.com/standards/openrtb-native/ https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-Native-Ads-Specification-Final-1.2.pdf

Index

Constants

View Source
const (
	PlacementTypeFeed                 = 1 // In the feed of content - for example as an item inside the organic feed/grid/listing/carousel.
	PlacementTypeAtomicContentUnit    = 2 // In the atomic unit of the content - IE in the article page or single image page
	PlacementTypeOutsideCoreContent   = 3 // Outside the core content - for example in the ads section on the right rail, as a banner-style placement near the content, etc.
	PlacementTypeRecommendationWidget = 4 // Recommendation widget, most commonly presented below the article content.

)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdUnit

type AdUnit int64

7.2 Native Ad Unit IDs in version 1.1. Deprecated/removed in version 1.2.

Below is a list of the core ad unit ids described by IAB here http://www.iab.net/media/file/IABNativeAdvertisingPlaybook120413.pdf

In feed unit is essentially a layout, it has been removed from the list. The in feed units can be identified via the layout parameter on the request.

An implementing exchange may not support all asset variants or introduce new ones unique to that system.

const (
	AdUnitPaidSearch           AdUnit = 1 // Paid Search Units
	AdUnitRecommendationWidget AdUnit = 2 // Recommendation Widgets
	AdUnitPromotedListing      AdUnit = 3 // Promoted Listings
	AdUnitInAd                 AdUnit = 4 // In-Ad (IAB Standard) with Native Element Units
	AdUnitCustom               AdUnit = 5 // Custom /”Can’t Be Contained”

)

type ContextSubType

type ContextSubType int64

7.2 Context Sub Type IDs

Next-level context in which the ad appears. Again this reflects the primary context, and does not imply no presence of other elements. For example, an article is likely to contain images but is still first and foremost an article. SubType should only be combined with the primary context type as indicated (ie for a context type of 1, only context subtypes that start with 1 are valid).

const (
	ContextSubTypeGeneral       ContextSubType = 10 // General or mixed content.
	ContextSubTypeArticle       ContextSubType = 11 // Primarily article content (which of course could include images, etc as part of the article)
	ContextSubTypeVideo         ContextSubType = 12 // Primarily video content
	ContextSubTypeAudio         ContextSubType = 13 // Primarily audio content
	ContextSubTypeImage         ContextSubType = 14 // Primarily image content
	ContextSubTypeUserGenerated ContextSubType = 15 // User-generated content - forums, comments, etc
	ContextSubTypeSocial        ContextSubType = 20 // General social content such as a general social network
	ContextSubTypeEmail         ContextSubType = 21 // Primarily email content
	ContextSubTypeChat          ContextSubType = 22 // Primarily chat/IM content
	ContextSubTypeSelling       ContextSubType = 30 // Content focused on selling products, whether digital or physical
	ContextSubTypeAppStore      ContextSubType = 31 // Application store/marketplace
	ContextSubTypeProductReview ContextSubType = 32 // Product reviews site primarily (which may sell product secondarily)

)

type ContextType

type ContextType int64

7.1 Context Type IDs

The context in which the ad appears - what type of content is surrounding the ad on the page at a high level. This maps directly to the new Deep Dive on In-Feed Ad Units. This denotes the primary context, but does not imply other content may not exist on the page - for example it's expected that most content platforms have some social components, etc.

const (
	ContextTypeContent ContextType = 1 // Content-centric context such as newsfeed, article, image gallery, video gallery, or similar.
	ContextTypeSocial  ContextType = 2 // Social-centric context such as social network feed, email, chat, or similar.
	ContextTypeProduct ContextType = 3 // Product context such as product listings, details, recommendations, reviews, or similar.

)

type DataAssetType

type DataAssetType int64

7.4 Data Asset Types

Below is a list of common asset element types of native advertising at the time of writing this spec. This list is non-exhaustive and intended to be extended by the buyers and sellers as the format evolves.

An implementing exchange may not support all asset variants or introduce new ones unique to that system.

const (
	// Type ID:
	//   1
	// Name:
	//   sponsored
	// Description:
	//   Sponsored By message where response should contain the brand name of the sponsor.
	// Format:
	//   text
	// Recommendations:
	//   Required. Max 25 or longer
	DataAssetTypeSponsored DataAssetType = 1

	// Type ID:
	//   2
	// Name:
	//   desc
	// Description:
	//   Descriptive text associated with the product or service being advertised.
	//   Longer length of text in response may be truncated or ellipsed by th exchange.
	// Format:
	//   text
	// Recommendations:
	//   Recommended. Max 140 or longer.
	DataAssetTypeDesc DataAssetType = 2

	// Type ID:
	//   3
	// Name:
	//   rating
	// Description:
	//   Rating of the product being offered to the user.
	//   For example an app’s rating in an app store from 0-5.
	// Format:
	//   number formatted as string
	// Recommendations:
	//   Optional. 0-5 integer formatted as string.
	DataAssetTypeRating DataAssetType = 3

	// Type ID:
	//   4
	// Name:
	//   likes
	// Description:
	//   Number of social ratings or “likes” of the product being offered to the user.
	// Format:
	//   number formatted as string
	DataAssetTypeLikes DataAssetType = 4

	// Type ID:
	//   5
	// Name:
	//   downloads
	// Description:
	//   Number downloads/installs of this product
	// Format:
	//   number formatted as string
	DataAssetTypeDownloads DataAssetType = 5

	// Type ID:
	//   6
	// Name:
	//   price
	// Description:
	//   Price for product / app / in-app purchase.
	//   Value should include currency symbol in localised format.
	// Format:
	//   number formatted as string
	DataAssetTypePrice DataAssetType = 6

	// Type ID:
	//   7
	// Name:
	//   saleprice
	// Description:
	//   Sale price that can be used together with price to indicate a discounted price compared to a regular price.
	//   Value should include currency symbol in localised format.
	// Format:
	//   number formatted as string
	DataAssetTypeSalePrice DataAssetType = 7

	// Type ID:
	//   8
	// Name:
	//   phone
	// Description:
	//   Phone number formatted
	// Format:
	//   string
	DataAssetTypePhone DataAssetType = 8

	// Type ID:
	//   9
	// Name:
	//   address
	// Description:
	//   Address
	// Format:
	//   text
	DataAssetTypeAddress DataAssetType = 9

	// Type ID:
	//   10
	// Name:
	//   desc2
	// Description:
	//   Additional descriptive text associated with the product or service being advertised
	// Format:
	//   text
	DataAssetTypeDesc2 DataAssetType = 10

	// Type ID:
	//   11
	// Name:
	//   displayurl
	// Description:
	//   Display URL for the text ad.
	//   To be used when sponsoring entity doesn’t own the content.
	//   IE sponsored by BRAND on SITE (where SITE is transmitted in this field).
	// Format:
	//   text
	DataAssetTypeDispayURL DataAssetType = 11

	// Type ID:
	//   12
	// Name:
	//   ctatext
	// Dewscription:
	//   CTA description - descriptive text describing a ‘call to action’ button for the destination URL.
	// Format:
	//   text
	// Recommendations:
	//   Optional. Max 15 or longer.
	DataAssetTypeCTAText DataAssetType = 12
)

type EventTrackingMethod

type EventTrackingMethod int64

7.7 Event Tracking Methods Table

const (
	EventTrackingMethodImage EventTrackingMethod = 1 // Image-pixel tracking - URL provided will be inserted as a 1x1 pixel at the time of the event.
	EventTrackingMethodJS    EventTrackingMethod = 2 // Javascript-based tracking - URL provided will be inserted as a js tag at the time of the event.

)

type EventType

type EventType int64

7.6 Event Types Table

const (
	EventTypeImpression      EventType = 1 // Impression
	EventTypeViewableMRC50   EventType = 2 // Visible impression using MRC definition at 50% in view for 1 second
	EventTypeViewableMRC100  EventType = 3 // 100% in view for 1 second (ie GroupM standard)
	EventTypeViewableVideo50 EventType = 4 // Visible impression for video using MRC definition at 50% in view for 2 seconds

)

type ImageAssetType

type ImageAssetType int64

7.5 Image Asset Types

Below is a list of common image asset element types of native advertising at the time of writing this spec. This list is non-exhaustive and intended to be extended by the buyers and sellers as the format evolves.

An implementing exchange may not support all asset variants or may introduce new ones unique to that system.

In order to facilitate adoption, recommendations are made for both minimum sizes and aspect ratios. We speak here of 'minimum maximum height' or ‘max height of at least’, which means the SSP should support a max height of at least this value. They are free to support larger, but the DSP knows that if they have an image of this size it will be accepted. Note that SSPs will be responsible for sizing image to exact size if min-maxheight framework is used; exact size may not be available at bid request time. Width is calculated from the 3 supported aspect ratios. Note we merged the prior overlapping type 1 and type 2 as just type 1 - to be used for app icon, brand logo, or similar.

const (
	ImageAssetTypeIcon ImageAssetType = 1 // Icon; Icon image; Optional. Max height: at least 50; aspect ratio: 1:1

	// Main; Large image preview for the ad. At least one of 2 size variants required:
	//   Small Variant:
	//     max height: at least 200
	//     max width: at least 200, 267, or 382
	//     aspect ratio: 1:1, 4:3, or 1.91:1
	//   Large Variant:
	//     max height: at least 627
	//     max width: at least 627, 836, or 1198
	//     aspect ratio: 1:1, 4:3, or 1.91:1
	ImageAssetTypeMain ImageAssetType = 3
)

type Layout

type Layout int64

7.1 Native Layout IDs in version 1.1. Deprecated/removed in version 1.2.

Below is a list of the core layouts described in the introduction above.

An implementing exchange may not support all asset variants or introduce new ones unique to that system.

const (
	LayoutContentWall   Layout = 1 // Content Wall
	LayoutAppWall       Layout = 2 // App Wall
	LayoutNewsFeed      Layout = 3 // News Feed
	LayoutChatList      Layout = 4 // Chat List
	LayoutCarousel      Layout = 5 // Carousel
	LayoutContentStream Layout = 6 // Content Stream
	LayoutGrid          Layout = 7 // Grid adjoining the content

)

type PlacementType

type PlacementType int64

7.3 Placement Type IDs

The FORMAT of the ad you are purchasing, separate from the surrounding context

type Protocol

type Protocol int8

Protocols (from AdCOM spec 1.0, List: Creative Subtypes - Audio/Video)

Options for the various bid response protocols that could be supported by an exchange.

Dev note: this enum is copied to native package to allow requiring native/{request,response} in root openrtb package in future.

const (
	ProtocolVAST10         Protocol = 1  // VAST 1.0
	ProtocolVAST20         Protocol = 2  // VAST 2.0
	ProtocolVAST30         Protocol = 3  // VAST 3.0
	ProtocolVAST10Wrapper  Protocol = 4  // VAST 1.0 Wrapper
	ProtocolVAST20Wrapper  Protocol = 5  // VAST 2.0 Wrapper
	ProtocolVAST30Wrapper  Protocol = 6  // VAST 3.0 Wrapper
	ProtocolVAST40         Protocol = 7  // VAST 4.0
	ProtocolVAST40Wrapper  Protocol = 8  // VAST 4.0 Wrapper
	ProtocolDAAST10        Protocol = 9  // DAAST 1.0
	ProtocolDAAST10Wrapper Protocol = 10 // DAAST 1.0 Wrapper
	ProtocolVAST41         Protocol = 11 // VAST 4.1
	ProtocolVAST41Wrapper  Protocol = 12 // VAST 4.1 Wrapper
	ProtocolVAST42         Protocol = 13 // VAST 4.2
	ProtocolVAST42Wrapper  Protocol = 14 // VAST 4.2 Wrapper
)

Directories

Path Synopsis
Package request provides OpenRTB Native 1.2 request types (section "4 Native Ad Request Markup Details")
Package request provides OpenRTB Native 1.2 request types (section "4 Native Ad Request Markup Details")
Package response provides OpenRTB Native 1.2 response types (section "5 Native Ad Response Markup Details")
Package response provides OpenRTB Native 1.2 response types (section "5 Native Ad Response Markup Details")

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL