承接 tv2regionerne/statamic-cookiebot 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tv2regionerne/statamic-cookiebot

最新稳定版本:v1.0.0

Composer 安装命令:

composer require tv2regionerne/statamic-cookiebot

包简介

README 文档

README

Statamic Cookiebot is a Statamic addon that integrates with CookieBot.

Features

Please see the cookiebot documentation for the js properties, methods and events https://www.cookiebot.com/da/developer/

How to Install

You can search for this addon in the Tools > Addons section of the Statamic control panel and click install, or run the following command from your project root:

composer require tv2regionerne/statamic-cookiebot

Set the ENV COOKIEBOT_ID with the Domain Group ID.
This is found in your cookiebot account under Your Scripts section.

COOKIEBOT_ID=4cdc3711-42e3-45f8-8143-70964c23343c

You may publish the config and overwrite the attributes of the tag. See the config/statamic-cookiebot.php files.

php artisan vendor:publish --tag=statamic-cookiebot-config

How to Use

Add this antlers tag to the header of your template to add the cookiebot js code.

<head>
  {{ cookiebot:scripts }}
</head>

The tag will output a html tag like this if the COOKIEBOT_ID env has been configured.

<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="00000000-0000-0000-0000-000000000000">

Client side

A javascript API is available directly from Cookiebot.
See the js documentation at https://www.cookiebot.com/en/developer/

Server side

For server side checking of consent, use one of the below tags.
The tags will return a boolean.

{{ cookiebot:necessary }}
{{ cookiebot:preferences }}
{{ cookiebot:statistics }}
{{ cookiebot:marketing }}
{{ cookiebot:all }}

To wrap some code use it like this.
Check for consent on necessary.

{{ if {cookiebot:necessary} }}
    // code when consent is given
{{ else }}
    // code when no consent is given
{{ /if }}

Tag options are:

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-01-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固