Documentation

Transaction
in package

A transaction simply describes a new consent.

Table of Contents

Properties

$blocker  : int
If the consent came from a content blocker, the ID of the content blocker.
$blockerThumbnail  : int|string
Can be the ID of the blocker thumbnail itself, or in format of `{embedId}-{fileMd5}`.
$buttonClicked  : string
The clicked button in the cookie banner.
$createdClientTime  : string
The ISO string of `new Date().toISOString()` on client side which reflects the time of consent given (not persist time).
$customBypass  : string
Allows to set a custom bypass which causes the banner to be hidden (e.g. Geolocation)
$decision  : array<string|int, mixed>|string
A set of accepted cookie groups + cookies or a predefined set like `all` or `essentials`.
$forwarded  : int
The reference to the consent ID of the source website (only for forwarded consents).
$forwardedBlocker  : bool
Determine if forwarded consent came through a content blocker.
$forwardedUuid  : string
The UUID reference of the source website.
$gcmConsent  : array<string|int, string>
Google Consent Mode consent types.
$ipAddress  : string
The IP address of the website visitor.
$markAsDoNotTrack  : bool
Mark as DNT.
$recorderJsonString  : string
Recorder JSON string for Replays.
$referer  : string
Referer.
$setCookies  : mixed
When `false`, the newly added transaction will not return any `SetCookie` instances. Use this, if you just want to save / persist a consent to the database but should not be updated on client side (e.g. delayed consents when server was not reachable).
$tcfString  : string
TCF string.
$uiView  : string
Can be `initial` (the cookie banner pops up for first time with first and second layer or content blocker) or `change` (Change privacy settings). `null` indicates a UI was never visible.
$userAgent  : string
The user agent of the website visitor.
$userCountry  : string
The country of the website visitor. This is automatically calculated when you pass in an IP address and you have enabled Geo Restriction (Country Bypass).
$viewPortHeight  : int
The viewport height.
$viewPortWidth  : int
The viewport width.

Methods

__construct()  : mixed
C'tor.
getBlocker()  : int
Get the blocker.
getBlockerThumbnail()  : int|string
Get the blocker thumbnail.
getButtonClicked()  : string
Get the button clicked.
getCreatedClientTime()  : string
Get the created client time.
getCustomBypass()  : string
Get the custom bypass.
getDecision()  : array<string|int, mixed>|string
Get the decision.
getForwarded()  : int
Get the forwarded consent ID.
getForwardedUuid()  : string
Get the forwarded UUID.
getGcmConsent()  : array<string|int, string>
Get the Google Consent Mode consent types.
getIpAddress()  : string
Get the IP address.
getRecorderJsonString()  : string
Get the recorder JSON string.
getReferer()  : string
Get the referer.
getTcfString()  : string
Get the TCF string.
getUiView()  : string
Get the UI view.
getUserAgent()  : string
Get the user agent.
getUserCountry()  : string
Get the user country.
getViewPortHeight()  : int
Get the viewport height.
getViewPortWidth()  : int
Get the viewport width.
isForwardedBlocker()  : bool
Get whether the forwarded consent came through a content blocker.
isMarkAsDoNotTrack()  : bool
Get whether the consent is marked as Do Not Track.
isSetCookies()  : bool
Get whether the consent should be set on cookies.
setBlocker()  : mixed
Set the blocker.
setBlockerThumbnail()  : mixed
Set the blocker thumbnail.
setButtonClicked()  : mixed
Set the button clicked.
setCreatedClientTime()  : mixed
Set the created client time.
setCustomBypass()  : mixed
Set the custom bypass.
setDecision()  : mixed
Set the decision.
setForwarded()  : mixed
Set the forwarded consent.
setGcmConsent()  : mixed
Set the Google Consent Mode consent types.
setIpAddress()  : mixed
Set the IP address.
setMarkAsDoNotTrack()  : mixed
Set if the consent should be marked as Do Not Track.
setRecorderJsonString()  : mixed
Set the recorder JSON string.
setReferer()  : mixed
Set the referer.
setSetCookies()  : mixed
Set if the consent should be set on cookies.
setTcfString()  : mixed
Set the TCF string.
setUiView()  : mixed
Set the UI view.
setUserAgent()  : mixed
Set the user agent.
setUserCountry()  : mixed
Set the user country.
setViewPort()  : mixed
Set the viewport width and height.

Properties

$blocker

If the consent came from a content blocker, the ID of the content blocker.

private int $blocker = 0

$blockerThumbnail

Can be the ID of the blocker thumbnail itself, or in format of `{embedId}-{fileMd5}`.

private int|string $blockerThumbnail

$buttonClicked

The clicked button in the cookie banner.

private string $buttonClicked

$createdClientTime

The ISO string of `new Date().toISOString()` on client side which reflects the time of consent given (not persist time).

private string $createdClientTime

$customBypass

Allows to set a custom bypass which causes the banner to be hidden (e.g. Geolocation)

private string $customBypass

$decision

A set of accepted cookie groups + cookies or a predefined set like `all` or `essentials`.

private array<string|int, mixed>|string $decision

$forwarded

The reference to the consent ID of the source website (only for forwarded consents).

private int $forwarded = 0

$forwardedBlocker

Determine if forwarded consent came through a content blocker.

private bool $forwardedBlocker = false

$forwardedUuid

The UUID reference of the source website.

private string $forwardedUuid

$gcmConsent

Google Consent Mode consent types.

private array<string|int, string> $gcmConsent

$ipAddress

The IP address of the website visitor.

private string $ipAddress

$markAsDoNotTrack

Mark as DNT.

private bool $markAsDoNotTrack = false

$recorderJsonString

Recorder JSON string for Replays.

private string $recorderJsonString

$setCookies

When `false`, the newly added transaction will not return any `SetCookie` instances. Use this, if you just want to save / persist a consent to the database but should not be updated on client side (e.g. delayed consents when server was not reachable).

private mixed $setCookies = true

$uiView

Can be `initial` (the cookie banner pops up for first time with first and second layer or content blocker) or `change` (Change privacy settings). `null` indicates a UI was never visible.

private string $uiView

$userAgent

The user agent of the website visitor.

private string $userAgent

$userCountry

The country of the website visitor. This is automatically calculated when you pass in an IP address and you have enabled Geo Restriction (Country Bypass).

private string $userCountry

$viewPortHeight

The viewport height.

private int $viewPortHeight = 0

$viewPortWidth

The viewport width.

private int $viewPortWidth = 0

Methods

__construct()

C'tor.

public __construct() : mixed
Tags
codeCoverageIgnore

getBlocker()

Get the blocker.

public getBlocker() : int
Return values
int

getBlockerThumbnail()

Get the blocker thumbnail.

public getBlockerThumbnail() : int|string
Return values
int|string

getButtonClicked()

Get the button clicked.

public getButtonClicked() : string
Return values
string

getCreatedClientTime()

Get the created client time.

public getCreatedClientTime() : string
Return values
string

getCustomBypass()

Get the custom bypass.

public getCustomBypass() : string
Return values
string

getDecision()

Get the decision.

public getDecision() : array<string|int, mixed>|string
Return values
array<string|int, mixed>|string

getForwarded()

Get the forwarded consent ID.

public getForwarded() : int
Return values
int

getForwardedUuid()

Get the forwarded UUID.

public getForwardedUuid() : string
Return values
string

getGcmConsent()

Get the Google Consent Mode consent types.

public getGcmConsent() : array<string|int, string>
Return values
array<string|int, string>

getIpAddress()

Get the IP address.

public getIpAddress() : string
Return values
string

getRecorderJsonString()

Get the recorder JSON string.

public getRecorderJsonString() : string
Return values
string

getReferer()

Get the referer.

public getReferer() : string
Return values
string

getTcfString()

Get the TCF string.

public getTcfString() : string
Return values
string

getUiView()

Get the UI view.

public getUiView() : string
Return values
string

getUserAgent()

Get the user agent.

public getUserAgent() : string
Return values
string

getUserCountry()

Get the user country.

public getUserCountry() : string
Return values
string

getViewPortHeight()

Get the viewport height.

public getViewPortHeight() : int
Return values
int

getViewPortWidth()

Get the viewport width.

public getViewPortWidth() : int
Return values
int

isForwardedBlocker()

Get whether the forwarded consent came through a content blocker.

public isForwardedBlocker() : bool
Return values
bool

isMarkAsDoNotTrack()

Get whether the consent is marked as Do Not Track.

public isMarkAsDoNotTrack() : bool
Return values
bool

isSetCookies()

Get whether the consent should be set on cookies.

public isSetCookies() : bool
Return values
bool

setBlocker()

Set the blocker.

public setBlocker(int $blocker) : mixed
Parameters
$blocker : int

setBlockerThumbnail()

Set the blocker thumbnail.

public setBlockerThumbnail(int|string $blockerThumbnail) : mixed
Parameters
$blockerThumbnail : int|string

setButtonClicked()

Set the button clicked.

public setButtonClicked(string $buttonClicked) : mixed
Parameters
$buttonClicked : string

setCreatedClientTime()

Set the created client time.

public setCreatedClientTime(string $createdClientTime) : mixed
Parameters
$createdClientTime : string

setCustomBypass()

Set the custom bypass.

public setCustomBypass(string $customBypass) : mixed
Parameters
$customBypass : string

setDecision()

Set the decision.

public setDecision(array<string|int, mixed>|string $decision) : mixed
Parameters
$decision : array<string|int, mixed>|string

setForwarded()

Set the forwarded consent.

public setForwarded(int $forwarded, string $forwardedUuid, bool $isForwardedBlocker) : mixed
Parameters
$forwarded : int
$forwardedUuid : string
$isForwardedBlocker : bool

setGcmConsent()

Set the Google Consent Mode consent types.

public setGcmConsent(array<string|int, string> $gcmConsent) : mixed
Parameters
$gcmConsent : array<string|int, string>

setIpAddress()

Set the IP address.

public setIpAddress(string $ipAddress) : mixed
Parameters
$ipAddress : string

setMarkAsDoNotTrack()

Set if the consent should be marked as Do Not Track.

public setMarkAsDoNotTrack(bool $markAsDoNotTrack) : mixed
Parameters
$markAsDoNotTrack : bool

setRecorderJsonString()

Set the recorder JSON string.

public setRecorderJsonString(string $recorderJsonString) : mixed
Parameters
$recorderJsonString : string

setReferer()

Set the referer.

public setReferer(string $referer) : mixed
Parameters
$referer : string

setSetCookies()

Set if the consent should be set on cookies.

public setSetCookies(bool $setCookies) : mixed
Parameters
$setCookies : bool

setTcfString()

Set the TCF string.

public setTcfString(string $tcfString) : mixed
Parameters
$tcfString : string

setUiView()

Set the UI view.

public setUiView(string $uiView) : mixed
Parameters
$uiView : string

setUserAgent()

Set the user agent.

public setUserAgent(string $userAgent) : mixed
Parameters
$userAgent : string

setUserCountry()

Set the user country.

public setUserCountry(string $userCountry) : mixed
Parameters
$userCountry : string

setViewPort()

Set the viewport width and height.

public setViewPort(int $viewPortWidth, int $viewPortHeight) : mixed
Parameters
$viewPortWidth : int
$viewPortHeight : int

        
On this page

Search results