Mobile RevToaster

A guide to setting up and modifying RevToaster widgets

rev_toaster

RevToaster displays as the user scrolls back to the top of the page on a mobile device.

 

Sample RevToaster Code:

(bold values are to be replaced with your widget's unique values)

<script src="http://labs-cdn.revcontent.com/build/revtoaster.min.js"></script>

<script>
   var toaster = new RevToaster({
api_key: 'your_api_key',
pub_id: 000,
widget_id: 000,
domain: 'your_site.com',
sponsored: 2
});
</script>

 

Required Parameters:

api_key

Your account's API key

api_key: 'hf3948hf9384hf938hf3hf0'

 

domain

Site this widget will be implemented on

domain: 'example.com'

 

pub_id

Your account ID

pub_id: 1234

 

widget_id

Your widget ID

widget_id: 123456

 


 

Optional Parameters:

ad_overlay

Key value ad overlay config object where the key is the content type and the value is the icon to use. For example to use the video_rectangle icon for video content use video: 'video_rectangle'. The icon will be appended to the .rev-ad element

ad_overlay: false

 

ad_overlay_position

The position of the ad overlay icon. Available options include center, top_left, top_right, bottom_right and bottom_left

ad_overlay_position: 'bottom_right'

 

closed_hours

Number of hours to remain closed, after being closed by user

closed_hours: 24

 

css

Additional custom CSS to append

css: ''

 

devices

Devices the widget will display on. Options include phone, tablet and desktop

devices: [
'phone',
'tablet'
]

 

header

Heading displayed above content. Wrapped inside ''

header: 'Trending Now'

 

hide_provider

Option to hide content provider names

hide_provider: false

 

image_overlay

Key value image overlay object config where the key is the content type and the value is the icon to use. For example to use the video_rectangle icon for video content use video: 'video_rectangle'. The icon will be appended to the .rev-image element

image_overlay: false

 

image_overlay_position

The position of the image overlay icon. Available options include center, top_left, top_right, bottom_right and bottom_left

image_overlay_position: 'center'

 

overlay_icons

Pass in custom icons where the key is the icon name and the value is the svg icon. For example {article_square: '<svg></svg>'}. Default icons include video_rectangle, video_square, video_circle1, video_circle2 and video_triangle

overlay_icons: false

 

query_params

Key value object for query params to send to server (can be multidimensional)

query_params: false

The example below demonstrates how to pass subid values. The resulting query parameters will be ?revsub[key]=value

query_params: {
revsub: {
key: 'value'
}
}

 

rev_position

Position of the disclosure text. Options include: 'bottom_right', 'top_right', 'bottom_left'

rev_position: 'bottom_right'

 

show_visible_selector

Query selector for element that will trigger widget to show once visible

show_visible_selector: false

 

sponsored

Number of sponsored ads to show. Options are "1" or "2"

sponsored: 1

 

testing

Ignores closed_hours and continues to pop with every upward scroll when set to "true" 

testing: false

 

user_agent

Pass user agent param to API

user_agent: false

 

user_ip

Pass user's IP to API

user_ip: false