2

I am looking for ideas on how to measure web traffic for site.com pages ( not force.com site VF pages). The requirement is to produce simple reports and dashboards in SFDC on how many unique visits per day, how much time user spent on the site.com pages etc.

These are publicly available site.com pages and we do not track users registrations.

thanks !

~SF

  • If it's public, why not just something like Google Analytics? – Mike Chale Sep 18 '13 at 19:22
2

Use google analytics. All those reports are built in.

To make report distribution easy, we set up a chatter group called "Web Analytics" and set up relevant reports from GA to email to an apex email service and post themselves to the group.

I'll put the code up if you'd like. I've heard email to chatter is coming soon.

For the base code, start with this: There's a managed package available, but I needed to make some modifications to it.

Here's my mods: https://gist.github.com/anonymous/78cccb5dec4da1586f4b

1) Using a custom setting to store the id of the group I want this to go to. You could just hard code it if you want.
2) Updated to use the newer chatter object (feeditem) instead of feedpost.
3) Built it to read a hashtag (that you create in the message body in google analytics) and then use that to select which library it goes into. We had a bizarre use case that led to that (partners who need their analytic data but shouldn't see each others'), which you probably don't want. Libraries are kinda old-school.

  • Thanks Shane, appreciate if you could share the code. I was wondering if SFDC provides some analytics tool for this purpose. – user3861 Sep 19 '13 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.