orbislabs / cmp

An IAB compliant CMP, with user privacy preserving features.
1 stars 0 forks source link

Create init() function to load script. #28

Open ydennisy opened 6 years ago

ydennisy commented 6 years ago

Suggestion from @ittus :

<script>
init(someConfig)()
</script>

Which is the pattern followed by https://developers.google.com/analytics/devguides/collection/analyticsjs/

the config object can contain a siteId

ydennisy commented 6 years ago
<script src="https://www.gstatic.com/firebasejs/5.0.4/firebase.js"></script>
<script>
  // Initialize Firebase
  var config = {
    apiKey: "AIzaSyDUWidMFv0hXHfDz-y91mq4zqCnOF7Nbi4",
    authDomain: "pluto-cmp.firebaseapp.com",
    databaseURL: "https://pluto-cmp.firebaseio.com",
    projectId: "pluto-cmp",
    storageBucket: "pluto-cmp.appspot.com",
    messagingSenderId: "691290580347"
  };
  firebase.initializeApp(config);
</script>