Skip to content

Commit 7c9a414

Browse files
authored
Merge pull request #104 from InteractiveAdvertisingBureau/develop
TCF Canada v1.1 and GPP String v1.1
2 parents d34525f + 84b3724 commit 7c9a414

File tree

4 files changed

+124
-98
lines changed

4 files changed

+124
-98
lines changed

Core/CMP API Specification.md

+6
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,12 @@ Valid data types are Integer and String. All other data types such as Boolean, D
813813
</td>
814814
</td>
815815
</tr>
816+
<tr>
817+
<td><code>ArrayOfRanges<code></td>
818+
<td>String</td>
819+
<td><p>The key name will be combined by a static name and the key of the record. If the input data contains multiple records, the CMP SDK will create multiple keys, each with a combination of name and key.</p>
820+
<p>The value consists of a sequence of "id:type"-pairs separated by underscore. E.g. "3:0_5:1_6:1_7:2_12:0"</p></td>
821+
</tr>
816822
</table>
817823

818824

Core/Consent String Specification.md

+27-15
Original file line numberDiff line numberDiff line change
@@ -594,68 +594,59 @@ In order to be backward compatible with IAB Europe’s TC String and US Privacy
594594

595595
A discrete section is encoded according to that specific section’s needs. This means today’s implementations that read and adapt to TCF v2.0 signals or US Privacy signals don't need to change their logic for a given discrete section of the string, as long as the implementation is aware of where the discrete section is.
596596

597-
598597
New sections should follow the guidelines below. Guidelines like these help developers quickly adopt new sections and allow for parsing new sections without the need to reinvent new data types.
599598

600-
601599
The possible data types are:
602600

603-
604601
<table>
605602
<tr>
606603
<td><strong>Data Type</strong></td>
607604
<td><strong>Encoding</strong></td>
608605
<td><strong>JS API output</strong></td>
609-
<td><strong>Description</strong></td>
610-
<td> </td>
606+
<td><strong>Description</strong></td>
611607
</tr>
612608
<tr>
613609
<td><code>Boolean</code></td>
614610
<td>1 bit</td>
615611
<td>true|false</td>
616612
<td>0=true, 1=false</td>
617-
<td></td>
618613
</tr>
619614
<tr>
620615
<td><code>Integer (fixed length of x)</code></td>
621616
<td>x bit</td>
622617
<td>Number</td>
623618
<td>A fixed amount of bit representing an integer. Usual lengths are 3, 6 or 12 bit. <br><br> Example: int(6) “000101” represents the number 5</td>
624-
<td></td>
625619
</tr>
626620
<tr>
627621
<td><code>Integer (Fibonacci)</code></td>
628622
<td>Variable Length</td>
629623
<td>Number</td>
630624
<td>Integer encoded using Fibonacci encoding <br><br> See <a href="https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Core/Consent%20String%20Specification.md#fibonacci-encoding-to-deal-with-string-length-"> “About Fibonacci Encoding” </a> for more detail</td>
631-
<td></td>
632625
</tr>
633626
<tr>
634627
<td><code>String (fixed length of x) (including country codes)</code></td>
635628
<td>x*6 bit</td>
636629
<td>String</td>
637630
<td>A fixed amount of bit representing a string. The character’s ASCII integer ID is subtracted by 65 and encoded into an int(6). <br><br>Example: int(6) “101010” represents integer 47 + 65 = char “h”</td>
638-
<td></td>
639-
</tr>
631+
</tr>
640632
<tr>
641633
<td><code>Datetime</code></td>
642634
<td>36 bit</td>
643635
<td>Date</td>
644636
<td>A datetime is encoded as a 36 bit integer representing the 1/10th seconds since January 01 1970 00:00:00 UTC. <br><br>Example JavaScript representation: Math.round((new Date()).getTime()/100)</td>
645-
<td></td>
646637
</tr>
647638
<tr>
648639
<td><code>Bitfield (fixed length of x)</code></td>
649640
<td>x bit</td>
650641
<td>Array of Number</td>
651642
<td>A fixed amount of bit. Usually each bit represents a boolean for an ID within a group where the first bit corresponds to true/false for ID 1, the second bit corresponds to true/false for ID 2 and so on.</td>
652-
<td></td>
653643
</tr>
654644
<tr>
655645
<td><code>N-bitfield (Variable length Bitfield)</code></td>
656646
<td>variable</td>
657647
<td>Array of Number</td>
658-
<td>Consists of two datapoints: a fixed length Integer(16) that denotes the length and a bitfield with that specific length.<br></br>Please note: Although the API reads/writes to fields (length + bitfield), it will only output the IDs from the bitfield via JS APIs.</td>
648+
<td>Consists of two datapoints: a fixed length Integer(16) that denotes the length and a bitfield with that specific length.
649+
<p>Please note: Although the API reads/writes to fields (length + bitfield), it will only output the IDs from the bitfield via JS APIs.</p></td>
659650
</tr>
660651
<tr>
661652
<td><code>Range (Int)</code></td>
@@ -682,7 +673,6 @@ The possible data types are:
682673
<li>Bits = 000000000010 0 0000000000000011 1 0000000000000101 0000000000001000</li>
683674
</ul>
684675
Note: items may not be in sorted order.</td>
685-
<td></td>
686676
</tr>
687677
<tr>
688678
<td><code>Range (Fibonacci)</code></td>
@@ -709,7 +699,6 @@ Note: items may not be in sorted order.</td>
709699
<li>Bits = 000000000010 0 0011 1 011 0011</li>
710700
</ul>
711701
Note: items MUST be in sorted order..</td>
712-
<td></td>
713702
</tr>
714703
<tr>
715704
<td><code>OptimizedRange</code></td>
@@ -736,6 +725,29 @@ Note: items MUST be in sorted order..</td>
736725
</ul>
737726
Note: This data type is used for downward compatibility only. OptimizedRange is the recommended data type to be used moving forward.</td>
738727
</tr>
728+
<tr>
729+
<td><code>ArrayOfRanges</code></td>
730+
<td>variable</td>
731+
<td>[{'key':number, 'type':number, 'ids':Array of number}, {...}, ...]</td>
732+
<td>Consists of a variable amount of fields:
733+
<p><ul><li>First field is always of type Int(12). The value indicates the number of records to follow.</li></p>
734+
<li>Each entry consists of three datatypes:</li>
735+
<ul><li>key - Int(6)</li>
736+
<li>type - Int(2)</li>
737+
<li>ids - <code>OptimizedIntRange </code>(uses Range(Int) for range of IDs, see <code>OptimizedIntRange</code> data type above for more details)</li></ul></ul>
738+
<p>Note: <code>ArrayOfRanges</code> is used for downwards compatibility only.</p></td>
739+
</tr>
740+
<tr>
741+
<td><code>N-ArrayOfRanges(X,Y)</code></td>
742+
<td>variable</td>
743+
<td>[{'key':number, 'type':number, 'ids':Array of number}, {...}, ...]</td>
744+
<td>Consists of a variable amount of fields:
745+
<p><ul><li>First field is always of type Int(12). The value indicates the number of records to follow.</li></p>
746+
<li>Each record consists of three datatypes:</li>
747+
<ul><li><b>key</b> - Int(X) Where X is given by the field definition within the corresponding specification.</li>
748+
<li><b>type</b> - Int(Y) Where Y is given by the field definition within the corresponding specification.</li>
749+
<li><b>ids</b> - <code>OptimizedRange </code>(uses Fibonacci coding for range of IDs, see <code>OptimizedRange</code> data type above for more details)</li></ul></ul></td></td>
750+
</tr>
739751
</table>
740752

741753

Core/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Global Privacy Platform
22

33

4-
Hosted in this repository are the technical specifications for the IAB Global Privacy Platform (GPP). The relevant specifications are:
4+
Hosted in this repository are the technical specifications for the IAB Global Privacy Platform (GPP). The relevant specifications:
55

66
- Global Privacy Platform String
77
- Consent Management API

0 commit comments

Comments
 (0)