1.4.2 • Published 5 months ago

think-cookie-popup v1.4.2

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

Think Cookie Popup

Managing cookie settings (save setting in cookies and try to update ga() settings via dataLayer) https://developers.google.com/tag-platform/tag-manager/datalayer

Add npm package to your app

yarn add think-cookie-popup

or

npm install think-cookie-popup

Implement in Vue app

In main.js

import CookieManagePopupVue from 'think-cookie-popup';

const app = createApp(App);
app.component('CookieManagePopup', CookieManagePopupVue);

use as compotent in your template

<template>
	<CookieManagePopup />
</template>
It apply props

ext-data where you can pass custom json content. See json example cookies-manage-option.json

<CookieManagePopup :ext-data="" />

ext-show for toggling show/hide popup

<CookieManagePopup :ext-show="" />

Not vue

import {CookieManagePopup} from 'think-cookie-popup';

cosnt popup = new CookieManagePopup('#target_mount');

Accessing by hash link default <a href="#cookiemanageshow">open popup</a> or can pass custom hash link to accessible() method.

popup.accessible();

or custom

popup.accessible('myCustomHashLinks');

Custom content

import customJsonContent from './custom.json';

popup.useOption(customJsonContent)

Development

yarn install

Compiles and hot-reloads for development

yarn serve

Build library

yarn build
1.4.2

5 months ago

1.4.1

5 months ago

1.3.2

6 months ago

1.4.0

5 months ago

1.3.1

6 months ago

1.3.0

7 months ago

1.2.1

7 months ago