Opened 3 years ago

Closed 3 years ago

#2301 closed New feature (fixed)

PHP Tracker getVisitorId() should discover first party ID cookie (and add getAttributionInfo())

Reported by: matt Owned by: matt
Priority: normal Milestone: Piwik 1.3
Component: Core Keywords:
Cc: Sensitive: no

Description

This is related to #2222, use case: third party tracking "after the fact". While #2222 proposes to the user to record the visitor ID and attribution data in some temporary data store, it is not always possible or easy to do so.

So, when the visitor itself will originate the Tracking API request, it would be easier if the Tracking API PHP client would provide the following function:

  • getVisitorId(): Already implemented, but returns a random ID. Instead, it should try and discover the first party cookie ID (via some regex magic since the cookie names have a random hash in them)
  • getAttributionInfo(): would return the content of the 'ref' cookie, which is a JSON encoded string

Change History (1)

comment:1 Changed 3 years ago by matt (mattab)

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

(In [4416]) Fixes #2301

Note: See TracTickets for help on using tickets.