Download the PHP package kreativsoehne/magento-2-google-analytics-opt-out without Composer

On this page you can find all versions of the php package kreativsoehne/magento-2-google-analytics-opt-out. 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 magento-2-google-analytics-opt-out

magento-2-google-analytics-opt-out

Magento 2 extension to give customers the ability to opt-out Google Analytics tracking. Useful for european union's countries (GDPR)

installation

1. $ composer require kreativsoehne/magento-2-google-analytics-opt-out
2. $ ./bin/magento module:enable kreativsoehne_AnalyticsOptout
3. $ ./bin/magento cache:clean
4. Profit.

usage

After installing and activating, you can place a simple deactivation checkbox nearly everywhere you want.

This is how you do it for a CMS page:

Content -> Elements -> Pages -> <edit page>

Reveal the Content part and switch Editor to markup mode. After that, place the following code anywhere you want.

<p><input class="ga-optout" type="checkbox" /> disable Google Analytics</p>
<p>{{block class="Magento\Framework\View\Element\Template" name="gaoptout" template="kreativsoehne_AnalyticsOptout::gaoptout.phtml"}}</p>

Clear the cache

$ ./bin/magento cache:clean

and open up that page on the frontend wihin a browser. You are now able to check and un-check a checkbox which will result in Google Analytics not tracking you on that browser.

how it works

This extension simply provides a small Template with some simple Java Script which can be placed anywhere via Magento's block feature. When checking the checkbox, a Java Script generates a cookie called "ga-disable-", which forces Google Analytics to stop collecting data. When un-checkig, the previously generated cookie will be deleted.

notice:

This Extension may not work in the future when new versions of google analytics with differend functionality appear.


All versions of magento-2-google-analytics-opt-out with dependencies

PHP Build Version
Package Version
Requires magento/framework Version ^101.0|^102.0
php Version >=7.0.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 kreativsoehne/magento-2-google-analytics-opt-out contains the following files

Loading the files please wait ....