Skip to content

LiveRamp/ccpa

Folders and files

NameName
Last commit message
Last commit date
Nov 19, 2019
Nov 22, 2019
Nov 19, 2019
Mar 20, 2024
Nov 19, 2019
Nov 19, 2019
Nov 19, 2019
May 18, 2023
Nov 19, 2019
Nov 26, 2019

Repository files navigation

ccpa

A Golang implementation of the IAB U.S. Privacy String (CCPA Opt-Out Storage Format)

You can read the full spec here.

To install:

go get -v github.com/LiveRamp/ccpa

This package defines a struct (Consent) which contains all of the fields of the IAB Consent String. The function Parse(s string) accepts the value of the us_consent parameter from the spec and returns a Consent with all relevant fields populated (or an error if one occurred).

Example use:

package main

import (
  "fmt"

  "github.com/LiveRamp/ccpa"
)

func main() {
  var c, err = ccpa.Parse("1YNN")
  if err != nil {
    panic(err)
  }
  fmt.Printf("%+v\n", c)
}