So I have this Omniture object. It's called s.
s
Inside s, we keep track of a bunch of information, inside "props" and "eVariables".
s.prop5 = 'foo'
s.prop22 = 'baz'
s.var6 = 'bar'
Which prop variables and which evars we choose to assign, depends on which page we're tracking. For example, on the homepage, we may wish to track prop5, prop6, and evar2, but on the registration page, we may wish to track prop4, prop5, prop9, prop10, evar4, evar5. It varies.
Each variable and each prop represents some kind of key analytics information.
Now, even though this solution is not ideal, because the prop#s can all blend together, we do have a master list that we keep internally, explaining which variable represents what.
prop5 means "page name"
prop6 means "page category"
(et cetera)
Now, this is fine, and it works well enough, but we often have to pass the code off to third parties so they can assign values themselves. We might have a 3rd party create a page, and we want to do analytics on it, but we need them to be able to get the appropriate information to track. To make it more readable, we were considering of implementing some mapping code.
companyName.pageName = 'This is the page name'
companyName.contentType = 'This is the content type'
companyName.campaignId = 'This is the campaign ID'
This is more readable. We would then loop through the "companyName" object, and assign every value back to 's' where appropriate.
What do you guys think? Would this be a good practice?