#3787 closed Bug (fixed)

Tracking API setVisitorId should throw exception if the visitor ID is not an hexadecimal string

Reported by: matt Owned by: mattab
Priority: normal Milestone: 1.11 - Piwik 1.11
Component: Core Keywords:
Cc: Sensitive: no

Description

per title. Otherwise users might think it's OK, but in fact it won't necessarily work as expected.

Change History (1)

comment:1 Changed 14 months ago by matt (mattab)

  • Owner set to mattab
  • Resolution set to fixed
  • Status changed from new to closed

In 12c3fbeb845c42d493df4440e35ccf95c3dcae45:

Fixes #3776, Fixes #3787

Adding integration test to test this code.

I also updated [ tracking api reference] to explain "cid" parameter.

cid — (requires token_auth to be set) defines the visitor ID for this request. You must set this value to exactly a 16 character hexadecimal string (containing only characters 01234567890abcdefABCDEF). When specified, the Visitor ID will be “enforced”. This means that if there is no recent visit with this visitor ID, a new one will be created. If a visit is found in the last 30 minutes with your specified Visitor Id, then the new action will be recorded to this existing visit.

Note: See TracTickets for help on using tickets.