Git Product home page Git Product logo

ccpa-reference-code's Introduction

CCPA-reference-code

Public workspace for CCPA publisher code dev

File usprivacy-string.js Implements class UsprivacyString

The class contains the methods to get/set the usprivacy string 
and a method to get the current version.

The usprivacy string as the format: ”vnol” where
v = version (int)
n = Notice Given (char)
o = OptedOut (char)
l = Lspact (char)

Example: “1YYY” Version 1, Notice given, Opted out, under Lspact.

Default is null.

File uspapi.js Implements the IAB tech lab U.S. Privacy API reference implementation

__uspapi("getuspdata", version, callback)

getuspdata will return the uspdata object { version, uspstring }
version supported (needs to be set to 1 for v1)
callback function returns uspdata object and success, success is either true of false.

index.html Simple reference implementation using U.S. Privacy API Set param lspact=0 to set yourself as a none signatory Note: this sample sets the cookie as a first party and secure. You will need HTTPS to get this to work. For debugging you can set the URL param debug=1 to make it work on HTTP, like http://localhost.

index.html Simple HTML to test all the API return calls

README.md This document

Build notes: To build you need NPM. Run npm install to install npm.

Run npm run build:dev to build dev Run npm start to build dev and start the web browser, loading the index.html.

Currently only tested within dev and on Chrome.

ccpa-reference-code's People

Contributors

a2intl avatar chrispaterson avatar heinzbaumann avatar jenniferiab avatar themaskmaker avatar wittjill 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.