@@ -29,6 +29,8 @@ function inject_ads_client() {
29
29
function create_ad_placement ( ) {
30
30
var selector = null ;
31
31
var class_name ; // Used for theme specific CSS customizations
32
+ var style_name ;
33
+ var ad_type = "readthedocs-sidebar" ;
32
34
var element ;
33
35
var offset ;
34
36
@@ -51,7 +53,13 @@ function create_ad_placement() {
51
53
class_name = 'ethical-rtd ethical-dark-theme' ;
52
54
} else if ( rtd . is_rtd_like_theme ( ) ) {
53
55
selector = 'nav.wy-nav-side > div.wy-side-scroll' ;
54
- class_name = 'ethical-rtd ethical-dark-theme' ;
56
+ if ( Math . random ( ) <= 0.1 ) {
57
+ // Use the stickybox placement 10% of the time during rollout
58
+ style_name = 'stickybox' ;
59
+ ad_type = 'image' ;
60
+ } else {
61
+ class_name = 'ethical-rtd ethical-dark-theme' ;
62
+ }
55
63
} else if ( rtd . is_alabaster_like_theme ( ) ) {
56
64
selector = 'div.sphinxsidebar > div.sphinxsidebarwrapper' ;
57
65
class_name = 'ethical-alabaster' ;
@@ -78,8 +86,9 @@ function create_ad_placement() {
78
86
return $ ( '<div />' )
79
87
. attr ( "id" , "rtd-sidebar" )
80
88
. attr ( "data-ea-publisher" , "readthedocs" )
81
- . attr ( "data-ea-type" , "readthedocs-sidebar" )
89
+ . attr ( "data-ea-type" , ad_type )
82
90
. attr ( "data-ea-manual" , "true" )
91
+ . attr ( "data-ea-style" , style_name )
83
92
. addClass ( class_name )
84
93
. appendTo ( selector ) ;
85
94
}
0 commit comments