I would like the cookie to be able to track ip's coming from a variable, like google cpc.
i'm confused by what you mean by your use of the word "variable" and not at all familiar with what you mean by "google cpc".
cookies are client-side. that means that each client has its own version of any given cookie. if you want to track a bunch of clients, you're doing this all on the server side someplace.