File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -367,6 +367,30 @@ module.exports = {
367367 versions : VERSIONS_JSON ,
368368 } ,
369369 ] ,
370+ function ( context , options ) {
371+ return {
372+ name : 'beamer' ,
373+ injectHtmlTags ( { content } ) {
374+ // Only inject Beamer when deployed to production, so we don't use up Beamer "users"
375+ if ( process . env . NODE_ENV === 'production' ) {
376+ return {
377+ // For performance, Beamer recommends injecting these scripts at the very bottom of the <body>
378+ // Thus, custom plugin is required here to use postBodyTags
379+ postBodyTags : [
380+ `<script>var beamer_config = { product_id : 'mUvQtqly31065' };</script>` ,
381+ {
382+ tagName : 'script' ,
383+ attributes : {
384+ src : 'https://app.getbeamer.com/js/beamer-embed.js' ,
385+ defer : 'defer' ,
386+ } ,
387+ } ,
388+ ] ,
389+ } ;
390+ }
391+ } ,
392+ } ;
393+ } ,
370394 ] ,
371395 customFields : { } ,
372396 themes : [ ] ,
You can’t perform that action at this time.
0 commit comments