Problem with forcedVisitorId


#1

Hi there

We are using the PHP API for Piwik to build the tracking object below. The curious thing is this. Our forcedVisitorId value is present in the PiwikTracker object when we debug it. The record is created in piwik_log_visit when we use the API. But the record has a different idvisitor from the one we’re trying to force.

(forcedDateTime is getting into the piwik_log_visit table, however.)

The piwik_log_visit.idvisitor value is 3621c620b4b2d305

Our forcedVisitorId is ffff13621c620ad3.

(There’s a visitorId value in the PiwikTracker which is neither of these…)

Are we overlooking a step in the creation of forcedVisitorId?

The full PiwikTracker contains the following values:

{
“DEBUG_APPEND_URL”: “”,
“cookieSupport”: true,
“userAgent”: “curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6”,
“localHour”: false,
“localMinute”: false,
“localSecond”: false,
“hasCookies”: false,
“plugins”: false,
“visitorCustomVar”: {
“1”: [
“retailer”,
“demo”
],
“2”: [
“store”,
“demo_W”
],
“3”: [
“sensorid”,
“22799”
],
“4”: [
“brand”,
“SE”
],
“5”: [
“breed”,
“MT”
]
},
“pageCustomVar”: false,
“customData”: false,
“forcedDatetime”: “1334002661”,
“token_auth”: “–secret–”,
“attributionInfo”: false,
“ecommerceLastOrderTimestamp”: false,
“ecommerceItems”: [],
“requestCookie”: “”,
“idSite”: “3”,
“urlReferrer”: null,
“pageUrl”: “http://multplx.com/--other_path_components_here--/visitorId/ffff13621c620ad3/timestamp/1334002661/?pk_campaign=SE&pk_kwd=pick”,
“ip”: null,
“acceptLanguage”: null,
“visitorId”: “28a09f5f65b3fe90”,
“forcedVisitorId”: “ffff13621c620ad3
}


(Matthieu Aubry) #2

to select the value from the piwik_log_visit table have you done SELECT UNHEX(visitor_id) ?


#3

Hi Matt

Many thanks again for the extremely prompt response.

When we execute

SELECT UNHEX ( idvisitor ) FROM piwik_log_visit

we get NULL in every case.

Can’t help thinking I’m missing something obvious here. Apologies if this is documented. I can’t find it.

David


(Matthieu Aubry) #4

sorry try SELECT HEX(idvisitor)