Skip to content

LiveRamp/ccpa

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)
}

Releases

No releases published

Packages

No packages published