Allow me to ignore some query string variables
Similar to the way you can "Exclude URL Query Parameters" in your Google Analytics site settings. We use lots of tracking codes, so our landing pages look like hits to many different pages instead of many hits to one page from a number of different referrers.
This can be done by setting a variable in the chartbeat js:
var _sf_async_config={uid:YOURID,domain:“YOURDOMAIN”,path:“/somepath/otherpath/page”};
7 comments
-
Allan Beaufour
commented
setting the 'path' will report whatever it is set to as the path for the page. So in my example above the path will be reported as "/somepath/otherpath/page". In other words, you need to do this generically through your page templates, in the backend or in the js.
-
Logan
commented
So setting path: on a page will cause the rest of the query string to be ignored?
eg: I'm fetching /foo/bar.php?blah=blah&baz=baz, but I only want charbeat to track /foo/bar.php and ignore the params completely..... this will do it?
-
Allan Beaufour
commented
Yeah, it's not in our FAQ. It should be.
-
Rob Fitzpatrick commented
Yes that would be great if I knew where the docs were. I can't find any mention of this at http://chartbeat.pbworks.com, the JS code doesn't have an obvious var to change, and I don't see other docs.
Can someone point me in the right direction? Thanks.
-
Joel commented
I would even go for excluding ALL query strings. It really pollutes our data to have the same story in multiple places.
-
jeremy
commented
Great idea
-
ddn
commented
Yes, please add this.