Download the PHP package itemvirtual/cookies-popup without Composer

On this page you can find all versions of the php package itemvirtual/cookies-popup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cookies-popup

Cookies popup

Laravel package

This package provides a popup layer to manage cookies consent

Latest Version on Packagist Total Downloads

Installation

You can install the package via composer:

Publish config file (with --force option to update)

You need to add package cookies name to the EncryptCookies except array

In laravel 11 you should add the cookies name to the encryptCookies method in your application's bootstrap/app.php file

Generate translations

There is a command to create the required translations in labels section

If you prefer to create the translations in a file, these are the necessary indexes

Usage

Print popup

To add cookie popup, put this code after footer in your html layout

If you set add-inline-styles to false in your config/cookies-popup.php. You should use getHeadStyles() inside your <head> html tag

To add a link to open the cookie popup, use the id cookies-popup-show parameter

Check if cookies are allowed

To hide or show content related with the cookies consent, use the allowed methods

Add Google Analytics scripts

To add the scripts in your layout (gtag.js or analytics.js), use the method you need ()

You need to add an env variable GA_MEASUREMENT_ID it can be a comma separated array

The analytics.js script can be normal or async script more info

analytics.js
Universal Analytics (gtag.js)

Styling

To styling your pop-up window, you have two options.
The custom_styles or custom_classes config parameters.

With custom_styles you can change some CSS styles. If you need a deeper design change, use custom_classes, which will concatenate your class to the generic one

Documentation links

Google Consent Mode

Cómo configurar el modo de consentimiento en sitios web
Cómo solucionar problemas del modo de consentimiento con Tag Assistant
Tag Manager consent mode support
Google Tag Assistant

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of cookies-popup with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package itemvirtual/cookies-popup contains the following files

Loading the files please wait ....