Trigging the Drawer (Storage Preferences)

There may be cases where you wish to trigger the storage preferences drawer where users can change their consent preferences without using the Osano cookie widget (the cookie icon). You can achieve this using the following code: 

To trigger the Storage/Cookie preferences drawer, you can utilize the following Javascript: 

  • Osano.cm.showDrawer('osano-cm-dom-info-dialog-open')
    • This is the preferred method.
  • DEPRECATED: Osano.cm.emit("osano-cm-dom-info-dialog-open")
    • This method has been deprecated. Please utilize Osano.cm.showDrawer.

Example: 

<a href="#" onclick="Osano.cm.showDrawer('osano-cm-dom-info-dialog-open')">Cookie Preferences</a>