1.0.0 • Published 4 years ago

montecarlo-inception v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

montecarlo-inception

This package is responsible for handling the special case of AS24 <> Montecarlo Iframe

Try it

  1. npm run build
  2. Open a live server (npm i -g serve) in the example/ folder and open simple.html

Installation

  1. Put this snippet at the end of your body tag:
<script
      src="https://montecarlo.int.finanzcheck-shared.de/inception/inception/index.js"
      charset="utf-8"
    >
</script>
  1. Call inception.init(inceptionOptions, extraOptions) afterwards (for information about the options read further)

InceptionOptions

OptionWhat
iframeNameName of the iframe (will be used to identify the iFrame)
iframeHostElementIdThe id of the container which will hold the iFrame
advertisementAdvertismentId
backUrlThe URL used to navigate to after a back click on the first page
isOptOutDid the user opt out before?

ExtraOptions

This can be a flat object containing any data. After receiving the readyevent this data will be published back to the iFrames application.

For Monte-Carlo this should be the car data

ToDo

  • IFFE or executable
  • Load in script
  • Pass attributes to script tag (needed?)
  • on CDN mc.ffg.de/frame/Script.js
  • Build to same name e.g. „script.js“, no hash
  • Open iFrame after script OR at div#id
  • Handle events as in frameman
  • Setup pollard
  • compile to at least es5 maybe even es3
  • Should request PAAS log call to persist cookie as first party
  • Implement solution for backlink logic
  • Save traversal to local storage and publish it after iFrames application is ready
  • Guard/Handle localStorage and sessionStorage
  • set and return resume hash