Skip to content

Instantly share code, notes, and snippets.

@commuterjoy
Last active December 31, 2015 12:29
Show Gist options
  • Save commuterjoy/7986819 to your computer and use it in GitHub Desktop.
Save commuterjoy/7986819 to your computer and use it in GitHub Desktop.
How to make a request for a commercial component on theguardian.com
<script>
require(['modules/commercial/loader'], function (CommercialComponent) {
var slot = document.querySelector('[class="js-sticky-upper"]');
var c = new CommercialComponent({config: guardian, oastoken: '%%C%%?'}).travel(slot);
})
</script>
@kenlim
Copy link

kenlim commented Dec 20, 2013

<script>
  require(['modules/commercial/loader'], function (CommercialComponent) {
    var slot = document.querySelector('[class="js-sticky-upper"]');
    var c = new CommercialComponent({config: guardian, oastoken: '%%C%%?', omniture: 'omniturecode'}).travel(slot);
  })
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment