How to treat visits based on other ID?

Visitors can get a special ID. 2 visits can have same IP and same piwik cookie but different special ID. Uniqueness then can no longer be differentiated by IP nor cookie ID. This special ID is passed to me by 3rd party.

What is the best and most elegant way to make everything revolve around this special ID and not piwik’s cookie ID?

I am new with this whole analytics thing, and piwik specifically. So far my approach is this:

-Make a plugin to record this extra ID in log_visit table via new visit hook.
-Archive (numeric) distinct IDs.

Now I can get the number of unique visitor – at my perspective, not your usual uniqueness.

But that is just 1 small step. I need almost everything reported to be based on this special ID.

I hope I’ve made myself clear.

Thanks.

I recommend you ask code questions in the piwik-hackers mailing list (see dev.piwik.org)

Thanks. I’ve been silently whining why this forums don’t have coding support section! Missed those mailing lists. style_emoticons/<#EMO_DIR#>/dry.gif