Social media user detection

What does it do ?

If a visitor is logged in to one of the supported Social networks(see below) then this will be recorded to your Google Analytics account that you have set up.

This way you have an perfect overview of what your visitors are using at the time they are browsing your website.

I have no screenhot

Project page : http://drupal.org/sandbox/Mschuddings/1786552

Git clone : git clone --recursive --branch 7.x-1.x Mschuddings@git.drupal.org:sandbox/Mschuddings/1786552.git
http://git.drupal.org/sandbox/Mschuddings/1786552.git

I have already checked my project with coder and parreview.

It is for Drupal 7, (Drupal 6 could be made if requested)

7.x-1.x is the current branch

Reviews

http://drupal.org/node/1774306#comment-6513200
http://drupal.org/node/1728308#comment-6513214
http://drupal.org/node/1791048#comment-6513246
New:
http://drupal.org/node/1771154#comment-6721042
http://drupal.org/node/1797960#comment-6721078
http://drupal.org/node/1802670#comment-6721128
New:
http://drupal.org/node/1770248#comment-
http://drupal.org/node/1859866
http://drupal.org/node/1834218#comment-6826790

CommentFileSizeAuthor
#26 coder-results.txt1.03 KBklausi
#15 network.png5.78 KBsuzane.goncalves

Comments

mschudders’s picture

Issue summary: View changes

added onyle for D7

mschudders’s picture

Issue summary: View changes

added reviews

mschudders’s picture

Issue summary: View changes

extra reviews

sanchi.girotra’s picture

Hi,

Please add git link corresponding to non-maintainer in the issue-summary like "git clone http://git.drupal.org/sandbox/Mschuddings/1786552.git social_network_user_detection".

Manual review of your module:

1. In .module file you have used variable social_network_user_detection_hyves_app_id which haven't uninstalled.

2. I think access argument access administration pages is not appropriate here.

sanchi.girotra’s picture

Issue summary: View changes

review bonus ?

mschudders’s picture

Hi Sanchi,

Thanks I've added the link and I also added the variable for removal (Was working on it ;-) )

I've created a custom permission for this module.

Kind regards

mschudders’s picture

Can anyone please review this or release this ?

Thanks
Kind regards!

mschudders’s picture

Add PAReview: review bonus tag

dSero’s picture

Status: Needs review » Needs work

Hi,

I look like a very nice project that probably will help many drupal users.

The automatic test looks just fine

Please notice several issues that may consider to take care of:
1. There is an uninstall hook, but no install hook
2. social_network_user_detection_init(), usually I recommended to make a return if fails in check, and only then perform the task (+ you could avoid the local variable)
3. social_network_user_detection_page_alter(), I would first perform a check and return and then the code itself:
if (!isset(variable_get('googleanalytics_account', NULL))) {
drupal_set_message(t('Please configure Google Analytics and this module if required.'));
watchdog('social_network_user_detection', 'Please set an GoogleAnalytics ID');
return;
}
...
4. _social_network_user_detection_javascript_reporting_functionality(). I did not understand why it done on server side, and not embedded in the static javascript that you already serve

Best Regards,
Moshe

mschudders’s picture

Hi Moshe

Thanks for your review:

  1. I don't need an install hook, so I don't think this a big problem ?
  2. What would you return then ? Also : you cannot use the return value of a function in the if (empty) check. Please elaborate
  3. I have implmented your proposal for 3
  4. Because the functions returned do the same but I need make sure only of them are in JS because the one is for older GA and then other one is for the newest version.

Kind regards
M

mschudders’s picture

Status: Needs work » Needs review
mschudders’s picture

Issue tags: +PAreview: review bonus

PAReview: review bonus

wimcms’s picture

For me is ok.

stixes’s picture

Interesting module indeed. I looked through the code.

Automated testing:
Codesniffer comes up blank. Good job.

Manual testing:
Code looks solid, no appearant flaws, good use of comments.
There is alot of javascript embedded in the code. I would seem appropriate to put this in one or more js files, however I do not consider this required (It's not _that_ much.. )
README file lacks structure. Look at the examples here http://drupal.org/node/447604 for better structure. Information looks ok though.

Fix the README and I'll be happy to approve.

mschudders’s picture

Hi,

Thanks everyone for the reviews.

I've created an structured README file.

Thanks
Can't wait for approval ^^

klausi’s picture

Status: Needs review » Closed (duplicate)
Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: http://drupal.org/node/1561062
Project 2: http://drupal.org/node/1793098

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

mschudders’s picture

Priority: Normal » Major
Status: Closed (duplicate) » Needs review

Hi Klausi

Coudl you please promote this one ?

Thanks (Re opening because I already closed the other one.)

megensel’s picture

Priority: Major » Normal

in social_network_user_detection.info Line 6:
dependencies[] = googleanalytics
Should be:
dependencies[] = google_analytics

Found it while trying to enable your module using drush.
*EDIT* Just realized that the project page and the module name don't match... Let me look into it for a min
*EDIT* You may want to add a line in your readme that mentions if using drush the auto download of dependencies will not work due to the problem listed above.

suzane.goncalves’s picture

StatusFileSize
new5.78 KB

Hi @Mschudders,

Automatic review:
Code standard is ok according to Coder Module.

Manual review:
It is a amazing module and worked great here, but something not much bad happened here.

I tryied to install the module and the following message were displayed duplicated: "Please configure Google Analytics and this module if required.". I know this message display because i need to configure my GA ID, but i couldn't find out why it displayed duplicated. I attached a picture.

I think you could also implement the hook_help explaining how to use your module. I got some confused trying to understand how to use it and what was the next step to configure the facebook app id, then i realized that there were instructions inside README.txt. Maybe you could also add this description inside the hook_help.

Well, it is just a idea. You did a good job.

mschudders’s picture

Hi mgensel

Thanks for the review !

I've added the line to my README file.
I've left to dependency like this because otherwise the install via Drupal won't enable GA.

Edit : found one wrong naming fixed this :)

Thanks for pointing it out.

mschudders’s picture

Hi

Thanks for the review.

I am looking into the issue it only happens after an installation (i'm regarding as real minor issue.)

I've implemented the hook help en this will be updated with more documentation when I have some more time :)

Thanks for the info !

klausi’s picture

Issue tags: -PAreview: review bonus

Removing review bonus tag, you have not done any manual review, you just posted the output of an automated review tool. Make sure to read through the source code of the other projects.

klausi’s picture

mschudders’s picture

mschudders’s picture

mschudders’s picture

Issue tags: +PAreview: review bonus

Manual review done.

klausi’s picture

Status: Needs review » Needs work
Issue tags: -PAreview: review bonus +PAreview: security

manual reivew:

  1. _social_network_user_detection_javascript_reporting_functionality(): Javscript should be put into dedicated *.js files.
  2. Same in _social_network_user_detection_social_network_testing()
  3. _social_network_user_detection_social_network_testing(): this is vulnerable to XSS exploits. If I enter foo', status : true, cookie : true, xfbml : true}); alert('XSS'); FB.init({ appId : 'foo as facebook app ID I get a nasty javascript popup. You need to sanitize user provided input before printing. Please read http://drupal.org/node/28984 again. And a even better solution: use Drupal.settings to pass down variables from PHP to Javscript where they will be transferred securely, see http://drupal.org/node/756722

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

mschudders’s picture

Status: Needs work » Needs review

Hi Klausi

I have fixed everything.

Hopefully I can go live now ;-)

Thanks
Regards

mschudders’s picture

mschudders’s picture

mschudders’s picture

Issue summary: View changes
mschudders’s picture

I did 3 reviews once more.

I have fixed everything not the way like you said exactly because otherwise I couldn't make it work. I have based my code upon nice modules like social_connect, ...

klausi’s picture

Issue tags: +PAreview: security

Please don't remove the security tag, we keep that for statistics and to show examples of security problems.

mschudders’s picture

Ok sorry klausi.

Kr

mschudders’s picture

Priority: Normal » Major
klausi’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus
StatusFileSize
new1.03 KB

Review of the 7.x-1.x branch:

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

Although you should definitively fix those issues I think they are not hard blockers, so I guess this RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

mschudders’s picture

Hi,

I have Fixed the bad line ending and :
98 | ERROR | Whitespace found at end of line
137 | ERROR | Whitespace found at end of line
138 | ERROR | Whitespace found at end of line
139 | ERROR | Whitespace found at end of line
140 | ERROR | Whitespace found at end of line
141 | ERROR | Whitespace found at end of line
142 | ERROR | Whitespace found at end of line
154 | ERROR | Case breaking statements must be followed by a single blank
| | line

Thank you very much ! awaiting promotion :-)

Kr

stborchert’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution, Michael!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

avpaderno’s picture

Title: Social network user detection » [D7] Social network user detection
Issue summary: View changes