trackMainFormView

The trackMainFormView() method tracks the initial automatic view of the consent form when a user first visits the website.

Syntax

ppms.cm.api('trackMainFormView', onFulfilled, onRejected);

Parameters

onFulfilled: () => void

The fulfillment handler callback.

onRejected: (error: object) => void

The rejection handler callback. If not specified, the error is logged in the console.

Examples

ppms.cm.api(
  'trackMainFormView',
  function () {
    console.log('Main form view tracked.')
  },
  function (error) {
    console.error(error)
  }
)