Skip to content

Helper for adsense and criteo for a rails project.

Notifications You must be signed in to change notification settings

fbbergamo/ads_helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdsHelper

Helper to build ads from Criteo and adsense

Usage

portable = Browser.new('Mozilla/5.0 (Linux; U; Android 1.5; en-gb; T-Mobile G1 Build/CRC1) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1')

ads = AdsHelper::Ads.new(client_id: client_id, browser: portable, amp: false)
<%= ads.banner(source: :adsense, id: '1234', screen: :all, options: { responsive: true }) %>
<%= ads.banner(source: :adsense, id: '1234', screen: :all, options: { dimension: '100x250' }) %>
<%= ads.banner(source: :criteo, id: '1234', screen: :all, options: { dimension: '100x200' }) %>

About

Helper for adsense and criteo for a rails project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published