I have an analytics web service that provides pageview statistics for several separate websites that are all serving up press releases. The analytics service pulls data for each of its client sites from Google Analytics and then answers API calls like "give me the 10 most viewed press releases for the past week."
I want each of the press release client web sites to be able to use whatever url format they like. However, I would also like to pass a set of metadata to the analytics web service including:
- google analytics profile id
- client id
- organization type id
- press release id
- actual url of page being hit
My plan is to use Google Analytics' trackPageview function, with an argument containing all this information, to rename the pageviews (see http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55485) and then my analytics service can parse these "URLs" to get all the metadata and the actual URL.
So my argument to trackPageview would look something like this:
/<google analytics profile id>/<client id>/<org type id>/<press release id>/:<url>
e.g
/UA-1234567-1/3467/5/234743/:/news/show/Local-Student-Wins-Lottery/234743
I gather that this is not the way that trackPageview is intended for use. Is there a better way to pass this information to my service or does this seem like a good solution?