Bitrix API

Trace

Class Trace

Table of Contents

Constants

DETECT_TIME_MINUTES  = 10
FIND_ENTITIES_TIME_DAYS  = 7

Methods

__construct()  : mixed
Trace constructor.
addChannel()  : $this
Add channel.
addPage()  : $this
Add page.
addUtm()  : $this
Add utm.
appendChannel()  : void
Append channel to trace.
appendEntity()  : void
Append channel to trace.
create()  : static
Create trace from string.
detectEntities()  : $this
Detect entities.
getAnalyticsClient()  : mixed
getChannelCollection()  : Collection|null
getGid()  : string|null
Get guest id.
getId()  : int|null
Get ID.
getPages()  : array<string|int, mixed>
Get pages.
getSourceId()  : mixed
getUrl()  : string
Get url.
getUtm()  : array<string|int, mixed>
Get utm.
loadByArray()  : $this
Load by array.
save()  : int|null
Save.
setGid()  : $this
Set guest id.
setMobile()  : $this
Set mobile.
setReferrer()  : $this
Set referrer.
setSource()  : $this
Set source.
setUrl()  : $this
Set url.
useDetectingOfDateCreate()  : $this
Use detecting of date create.
useTraceDetecting()  : $this
Use trace detecting.

Constants

DETECT_TIME_MINUTES

public mixed DETECT_TIME_MINUTES = 10

FIND_ENTITIES_TIME_DAYS

public mixed FIND_ENTITIES_TIME_DAYS = 7

Methods

__construct()

Trace constructor.

public __construct([array<string|int, mixed> $data = null ]) : mixed
Parameters
$data : array<string|int, mixed> = null

Data.

addChannel()

Add channel.

public addChannel(Base $channel) : $this
Parameters
$channel : Base

Channel instance.

Return values
$this

addPage()

Add page.

public addPage(string $url, int $timestamp[, string|null $title = null ]) : $this
Parameters
$url : string

Url.

$timestamp : int

Timestamp.

$title : string|null = null

Title.

Return values
$this

addUtm()

Add utm.

public addUtm(string $name, string $value) : $this
Parameters
$name : string

Name.

$value : string

Value.

Return values
$this

appendChannel()

Append channel to trace.

public static appendChannel(int $traceId, Base $channel) : void
Parameters
$traceId : int

Trace ID.

$channel : Base

Channel.

appendEntity()

Append channel to trace.

public static appendEntity(int $traceId, int $entityTypeId, int $entityId) : void
Parameters
$traceId : int

Trace ID.

$entityTypeId : int

Entity type ID.

$entityId : int

Entity ID.

create()

Create trace from string.

public static create([string|null $string = null ]) : static
Parameters
$string : string|null = null

Trace string.

Return values
static

detectEntities()

Detect entities.

public detectEntities() : $this
Return values
$this

getAnalyticsClient()

public getAnalyticsClient() : mixed

getGid()

Get guest id.

public getGid() : string|null
Return values
string|null

getId()

Get ID.

public getId() : int|null
Return values
int|null

getPages()

Get pages.

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

getSourceId()

public getSourceId() : mixed

getUrl()

Get url.

public getUrl() : string
Return values
string

getUtm()

Get utm.

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

loadByArray()

Load by array.

public loadByArray(array<string|int, mixed> $data) : $this
Parameters
$data : array<string|int, mixed>

Data.

Return values
$this

save()

Save.

public save() : int|null
Return values
int|null

setGid()

Set guest id.

public setGid(string $gid) : $this
Parameters
$gid : string

Guest ID.

Return values
$this

setMobile()

Set mobile.

public setMobile(bool $isMobile) : $this
Parameters
$isMobile : bool

Is mobile.

Return values
$this

setReferrer()

Set referrer.

public setReferrer(string $ref) : $this
Parameters
$ref : string

Referrer page.

Return values
$this

setSource()

Set source.

public setSource(int|string $source) : $this
Parameters
$source : int|string

Source code or ID.

Return values
$this

setUrl()

Set url.

public setUrl(string $url) : $this
Parameters
$url : string

Url.

Return values
$this

useDetectingOfDateCreate()

Use detecting of date create.

public useDetectingOfDateCreate([bool $mode = true ]) : $this
Parameters
$mode : bool = true

Mode.

Return values
$this

useTraceDetecting()

Use trace detecting.

public useTraceDetecting([bool $mode = true ]) : $this
Parameters
$mode : bool = true

Mode.

Return values
$this

        
On this page

Search results