Bitrix Site Manager

CStatEvent::DecodeGID

array
CStatEvent::DecodeGID(
 string gid
)

The method DecodeGID decodes the specified special parameter used with methods CStatEvent::Add, CStatEvent::AddByEvents.

Note
The method will successfully decode the parameters in both encoded and human-readable formats.

Parameters

Parameter Description
gid Special parameter.

Return Values

Returns an array in the following format:

Array
(
    [SESSION_ID] => the session ID
    [GUEST_ID] => the visitor ID
    [COUNTRY_ID] => the country ID
    [ADV_ID] => the advertising campaign ID
    [ADV_BACK] => Y - return under the advertising campaign; 
                  N - direct hit
    [SITE_ID] => the site ID
)

See Also

Example



<?
// decode the special parameter
$arr = CStatEvent::DecodeGID("BITRIX_SM.OTk1LjgyLk4wLjI1Lk4ucnU%3D");

// print the result
echo "<pre>"; print_r($arr); echo "</pre>";
?>