A Google Analytics plugin for measuring Vimeo Player Events. The plugin supports Universal Analytics, Classic Google Analytics, and Google Tag Manager.
Usage
Include the scripts in the body section of the HTML document, just before the tag. You’ll need to be running on a web server instead of opening the file directly in your browser. Flash and JS security restrictions will prevent the API from working when run locally.
Basic event trackers
- Category: Vimeo
- Action:
- Started video: when the video starts playing.
- Paused video: when the video is paused.
- Resumed video: when the video starts playing when it was paused.
- Completed video: when the video reaches 100% completion.
- Skipped video: when the video is skipped forward or backward.
- Label: URL and name (optional) of embedded video on Vimeo.
Module name: Google Analytics Vimeo
Sandbox project page: https://www.drupal.org/sandbox/arun/2545154
Git repository: branch 7.x-1.x
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/ARUN/2545154.git google_analytics_vimeo
Setting Repository:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/ARUN/2545154.git google_analytics_vimeo
cd google_analytics_vimeoPAReview: http://pareview.sh/pareview/httpgitdrupalorgsandboxarun2545154git
Manual reviews of other projects:
- https://www.drupal.org/node/2349575#comment-10172432
- https://www.drupal.org/node/2541244#comment-10168022
- https://www.drupal.org/node/2543346#comment-10172620
- https://www.drupal.org/node/2542506#comment-10167956
- https://www.drupal.org/node/2545164#comment-10190178
- https://www.drupal.org/node/2550661#comment-10216629
- https://www.drupal.org/node/2554655#comment-10244507
- https://www.drupal.org/node/2540270#comment-10244633
- https://www.drupal.org/node/2570923#comment-10357023
Comments
Comment #2
PA robot commentedProject 1: https://www.drupal.org/node/2545934
Project 2: https://www.drupal.org/node/2542176
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.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
PA robot commentedFixed the git clone URL in the issue summary for non-maintainer users.
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #4
arun ak commentedComment #5
arun ak commentedAdded manual review links for review bonus tag.
Comment #6
arun ak commentedComment #7
arun ak commentedComment #8
ajalan065 commentedHi ARUN AK,
1. There is no need of so many blank lines in between the tags in the *.info file. Just leave an extra line at the end of the file.
2. Get the path to library by libraries_get_path('library') instead of hardcoded path(sites/all/libraries) in the *.module file as well as *.install file.
3. We generally do not code the js in the *.module file itself. So it is recommended that you move the entire code
to a separate place, and access it here instead.
4. It is better to use current_path() instead of $_GET['q']. Please make changes in your *.module for the same.
Comment #9
arun ak commentedHi ajalan065,
Thanks for your comments. Fixed all the issues mentioned in your comment. Please check and verify.
1. Blank space removed from *.info file.
2. replaced "sites/all/libraries" with libraries_get_path('vimeo.ga.js').
3. Moved all js code in to separate inc file.
5. Replaced $_GET['q'] with drupal's current_path() function.
Thanks,
ARUN AK
Comment #10
arun ak commentedComment #11
arun ak commentedComment #12
gauravsood91 commentedManual Review
Individual user account
Yes: Follows guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements
Coding style & Drupal API usage
Meets coding style and api guidelines
Comment #13
arun ak commentedHi gaurav/ajalan065,
Did you get a chance to check the functionality of this module? I mean how this module tracking different Vimeo player events.
Comment #14
larowlanCouple of observations
drupal_add_js(drupal_get_path('module', 'googleanalytics_vimeo') . '/googleanalytics_vimeo.js', array('scope' => 'footer'));- would it still work if you used$page['#attached']['js'][] =here?Would make d8 upgrade easier and would be cache-safe.
In
googleanalytics_vimeo_settings()you could use'#type' => 'checkboxes'for'googleanalytics_vimeo_tracking_options'and simplify the code.In the admin code
$visibility == 2this would best be served with a constant, for readability (2 seems magic).Are you totally wedded to supporting php.module and php based visibility? If so, you should try an integrate with paranoia module. If you can live without it, I'd remove it - one less vector.
In
googleanalytics_vimeo_admin_config_jsyou can add this in one call to drupal_add_js, just build a keyed array.In the JavaScript you loop over
$.each(vimeo_iframes, function (index, iframe)twice - can this be combined into a single pass?I note also you use
vimeo_iframes = $('iframe');could you not usevimeo_iframes = $('iframe[src*=player.vimeo.com]');and filter the result from the onset?Other than these observations - this looks well coded and care has been taken with the module - thank you for contributing to Drupal.
Comment #15
arun ak commentedHi larowlan,
I worked on the issues you mentioned above. Please see my comments below:
1) drupal_add_js() replaced with ['#attached']['js'][].
2) Changed field type in to 'checkboxes' instead of 'checkbox' for 'googleanalytics_vimeo_tracking_options' and simplified the code.
3) replaced 2 with constant GOOGLEANALYTICS_VIMEO_USE_PHP_FOR_TRACKING.
4) I have integrated paranonia module with the code. Implemented hook_paranoia_hide_permissions().
5) Created a keyed array in drupal_add_js() instead of calling multiple times in googleanalytics_vimeo_admin_config_js().
6) Removed multiple $.each from javascript code and code combined.
7) Replaced vimeo_iframes = $('iframe'); with vimeo_iframes = $('iframe[src*="player.vimeo.com"]'); in js file and simplified the code.
Thanks,
ARUN AK
Comment #16
arun ak commentedAdded one more manual review link to prioritize the application.
Comment #17
arun ak commentedComment #18
arun ak commentedComment #19
klausiReview of the 7.x-1.x branch (commit fa137a1):
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.
The settings page can be edited by any anonymous user, which is a security blocker right now. And please don't remove the security tag, we keep that for statistics and to show examples of security problems.
Comment #20
ayaz.mrz commentedHi Arun,
I did PAReview and found following issue
Review of the 7.x-1.x branch (commit fa137a1):
Comment #21
arun ak commentedHi klausi,
Thanks for your review. I have fixed the issues you mentioned above.
1) Fixed spacing issue googleanalytics_vimeo.inc fie.
2) Fixed "vimeoGAJS" is not defined. (no-undef) issue in googleanalytics_vimeo.js.
3) Admin page access restriction issue fixed. Now admin page is not accessible by anonymous users.
@ayaz.mrz, js issue you mentioned also fixed.
Thanks,
ARUN AK
Comment #22
klausiReview of the 7.x-1.x branch (commit fe32e09):
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.
manual review:
Otherwise looks good to me. Assigning to Ayesh as he might have time to take a final look at this.
Comment #23
arun ak commentedHi klausi,
I have fixed the issues mentioned by you.
Thanks,
ARUN AK
Comment #24
klausino objections for more than a week, so ...
Thanks for your contribution, ARUN AK!
I updated your account so you can 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 stay 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.