File tree Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 11
11
< % end %>
12
12
13
13
< %= snowplow_pixel() %>
14
-
15
-
16
-
14
+ < %= munchkin() %>
Original file line number Diff line number Diff line change @@ -116,3 +116,32 @@ def snowplow_pixel()
116
116
117
117
return html
118
118
end
119
+
120
+ def munchkin ( )
121
+ html = <<-EOF
122
+ <script type="text/javascript">
123
+ (function() {
124
+ var didInit = false;
125
+ function initMunchkin() {
126
+ if(didInit === false) {
127
+ didInit = true;
128
+ Munchkin.init('875-UVY-685');
129
+ }
130
+ }
131
+ var s = document.createElement('script');
132
+ s.type = 'text/javascript';
133
+ s.async = true;
134
+ s.src = '//munchkin.marketo.net/munchkin.js';
135
+ s.onreadystatechange = function() {
136
+ if (this.readyState == 'complete' || this.readyState == 'loaded') {
137
+ initMunchkin();
138
+ }
139
+ };
140
+ s.onload = initMunchkin;
141
+ document.getElementsByTagName('head')[0].appendChild(s);
142
+ })();
143
+ </script>
144
+ EOF
145
+
146
+ return html
147
+ end
You can’t perform that action at this time.
0 commit comments