CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Public Directory Visitor Stats
Pages: [1]

Author Topic: Public Directory Visitor Stats  (Read 1339 times)

ds505

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 3
Public Directory Visitor Stats
February 13, 2009, 12:45:55 pm
I have a Joomla 1.5 and CiviCRM 2.1 site. I'm trying to get some type of Webstats/Google analytics tracking connected to a contacts profile from a public directory pushed out by Civi.

Example:
Directory of members --> click on John Smith--> View his details

Result:
Site admin would like to see how many times John Smith's record was viewed or displayed.

I tried using Google Analytics, but the Content by Title page only shows the name of the profile and not the individual member's name. Looking at the URL report gives the URL with a unique ID, but it would be too cumbersome for the client to figure out which member it is.

I would think there is some javascirpt that we could throw in a *.tpl file but not sure where to begin. Or maybe a way to add the first and last name to the page title when the member's record is viewed.

Any suggestions?

-B
« Last Edit: February 13, 2009, 12:59:10 pm by ds505 »
Data-Scribe(r)
http://www.datascribe.biz

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Public Directory Visitor Stats
February 13, 2009, 03:35:52 pm

You can hack the php code and relevant tpl at: CRM/Profile/Page/View.php

you can use CRM_Utils_System::setTitle( $title ); call to set the title on that page.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Public Directory Visitor Stats
February 13, 2009, 03:55:39 pm
Including the contact's display name is a good idea / generally useful. I've added it for 2.2. You can see the changes here if you want to backport:

http://fisheye.civicrm.org/viewrep/CiviCRM/branches/v2.2/CRM/Profile/Page/View.php?r1=19303&r2=19885
Protect your investment in CiviCRM by  becoming a Member!

ds505

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 3
Re: Public Directory Visitor Stats
February 18, 2009, 09:01:00 pm
That rocks! Thanks!!!
Data-Scribe(r)
http://www.datascribe.biz

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Public Directory Visitor Stats

This forum was archived on 2017-11-26.