Code Monkey home page Code Monkey logo

rastmob / cookie-management Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 0.0 109 KB

Designed for developers who value compliance and user experience, the Rast Mobile Cookie Consent Script seamlessly integrates with your website, ensuring GDPR compliance while enhancing user interaction. It provides clear, customizable consent management, allowing website visitors to control their data, all while maintaining the functionality.

Home Page: https://rastmob.github.io/cookie-management/

License: MIT License

HTML 27.28% CSS 21.86% JavaScript 50.85%
consent-management cookie cookie-consent cookie-session javascript javascript-library kvkk localstorage localstorage-api session-management

cookie-management's Introduction

RastMobile Cookie Consent Script

Description

This repository contains a JavaScript-based cookie consent management system designed for websites to comply with privacy regulations. It includes a cookie bar and a settings modal, allowing users to manage their preferences for different categories of cookies.

Features

  • Dynamically generated cookie settings modal with multi-language support.
  • Support for multiple cookie categories (e.g., Necessary, Analytics, Marketing).
  • Accept/Reject options for individual cookie categories with detailed audit logging.
  • Easy customization and integration with tag management systems.

Modal Content

Installation

  1. Clone the Repository:

    git clone https://github.com/rastmob/cookie-management.git
  2. Include the Script and CSS: Add the following lines to your HTML file:

    <link rel="stylesheet" href="./style.css">
    <script src="./cookiesettings.js"></script>
  3. Add Script Tags: Include your script tags with the necessary data- attributes in your HTML file. For example:

    <script
      type="text/plain"
      data-rastmobile-cookiecategory="marketing"
      data-scriptname="Marketing Script"
      data-scripturl="/./marketing-script.js">
    </script>

Usage

The script automatically generates a cookie consent bar and a settings modal on page load. Users can choose to accept or reject cookies by category. The settings modal can be accessed by clicking the "Cookie Settings" button in the cookie bar.

Customization

You can customize the appearance and behavior of the cookie consent system by modifying style.css and cookiesettings.js.

Supported Versions

  • Google Chrome: Version 60 and later
  • Mozilla Firefox: Version 55 and later
  • Safari: Version 10 and later
  • Microsoft Edge: Version 15 and later
  • Opera: Version 47 and later
  • Internet Explorer: Version 11

Notes:

  • Mobile Browsers: If your audience uses mobile devices significantly, consider support for mobile browser versions like Chrome for Android, Safari on iOS, and Samsung Internet.
  • Fallbacks and Polyfills: For older browsers, consider using JavaScript polyfills or fallback strategies for better compatibility.
  • Testing: Always test your script across different browsers and versions to ensure compatibility.
  • Updates: Keep an eye on browser market share and update supported versions accordingly, as browser landscapes can change relatively quickly.

Contributing

Contributions are welcome! If you have suggestions or improvements, feel free to fork this repository and submit a pull request.

License

This project is licensed under the MIT License.

Contact

For questions or feedback, please contact [email protected] / [email protected]

cookie-management's People

Contributors

mobilerast avatar sgizemmazi avatar tugce-7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.