as-ideas / oil

191 stars 56 forks source link

SPA Integration #274

Closed upandfine closed 3 years ago

upandfine commented 5 years ago

How can oil.js be meaningfully integrated into an SPA such as vuejs?

NKjoep commented 4 years ago

Have a look at the documentation https://oil.axelspringer.com/release/1.3.5/docs/index.html#oil-events.

There are a bunch of events your SPA can listen to, example:

Event name Description

oil_optin_done

When a users selects opt-in.

oil_optin_done_button_clicked

When a users clicks the opt-in button.

oil_soi_optin_done

When a users selects opt-in and this is a single opt-in.

oil_poi_optin_done

When a users selects opt-in and this is a power opt-in.

oil_as_cpc_privacy_selected

When a user used the cpc and clicked opt-in.

oil_click_advanced_settings

When a users clicks the advanced settings button/link.

oil_click_back_to_main

When a user clicks the back link from the advanced settings page.

oil_no_cookies_allowed

When a users has no cookies allowed and the no cookies layer is displayed

oil_has_optedin

On every page reload, when the user has opted_in previously (OIL should be hidden)

oil_shown

When oil is shown

oil_hide_layer

When oil gets automatically hidden

oil_click_thirdparty_list

When a user clicks the third party list link

oil_click_company_list

When a user clicks the company list link