{"_id":"jquery.iframetracker","_rev":"11-8dd439ca63e1daf11392eb7822cbde3b","name":"jquery.iframetracker","description":"jQuery Plugin to track click on iframes (like Google Adsense or Facebook Like button).","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.4":{"name":"jquery.iframetracker","version":"1.0.4","description":"jQuery Plugin to track click on iframes (like Google Adsense or Facebook Like button).","main":"jquery.iframetracker.js","repository":{"type":"git","url":"https://github.com/finalclap/iframeTracker-jquery.git"},"keywords":["jquery-plugin","iframe","youtube","adsense","advertising","click"],"author":{"name":"Vincent Paré"},"license":"Apache-2.0","bugs":{"url":"https://github.com/finalclap/iframeTracker-jquery/issues"},"homepage":"https://github.com/finalclap/iframeTracker-jquery","gitHead":"121a93b47b061fa3ff84f8250d7a7531b397a22f","_id":"jquery.iframetracker@1.0.4","scripts":{},"_shasum":"27da2082806a9d8bb214e832ee1a84113e189b41","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"finalclap","email":"opensource@finalclap.com"},"maintainers":[{"name":"finalclap","email":"opensource@finalclap.com"}],"dist":{"shasum":"27da2082806a9d8bb214e832ee1a84113e189b41","tarball":"https://registry.npmjs.org/jquery.iframetracker/-/jquery.iframetracker-1.0.4.tgz","integrity":"sha512-TOMeamuGMQMyZ5pSqVyS1YgFN/ITYyXv62VPMDWLX8Tz8cenAo3oWYqo6mAbhghQ3eDx3P5sMcyIDCxw4BkNJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKtnoL4QAxaYH+6vY9HBWmypZG8UaspH0coO0ai/UbWAIgDWoF/BWgvaVNRQCirC0NMj02INvGkfpI2/8usbUlPlM="}]},"directories":{}},"1.0.5":{"name":"jquery.iframetracker","version":"1.0.5","description":"jQuery Plugin to track click on iframes (like Google Adsense or Facebook Like button).","main":"jquery.iframetracker.js","repository":{"type":"git","url":"https://github.com/vincepare/iframeTracker-jquery.git"},"keywords":["jquery-plugin","iframe","youtube","adsense","advertising","click"],"author":{"name":"Vincent Paré"},"license":"Apache-2.0","bugs":{"url":"https://github.com/vincepare/iframeTracker-jquery/issues"},"homepage":"https://github.com/vincepare/iframeTracker-jquery","gitHead":"1f983cf7d87e7dd8f3d7aaca3310e435bd5f5d5a","_id":"jquery.iframetracker@1.0.5","scripts":{},"_shasum":"fef4f02ed233150eceb16a822fa91a2e6b6413ab","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"vincepare","email":"opensource@finalclap.com"},"maintainers":[{"name":"vincepare","email":"opensource@finalclap.com"}],"dist":{"shasum":"fef4f02ed233150eceb16a822fa91a2e6b6413ab","tarball":"https://registry.npmjs.org/jquery.iframetracker/-/jquery.iframetracker-1.0.5.tgz","integrity":"sha512-KFGWJ34cY4UUhKk++b7N75o12qp2lpivQchuAjUZ3tHOxNME+gvI8CAc8Tu3l9UJTlkf1nZM1Ng5Ur7DZ8ZoKg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBvv/Ey5Tiis6+FJFjSCJm7MJ5PuadDMTjzHLJSBNZpAIgRegq+O5r6Sf68FZQR5EyVZqdF5LL/Zg7nQEisjuWUVc="}]},"directories":{}},"1.1.0":{"name":"jquery.iframetracker","version":"1.1.0","description":"jQuery Plugin to track click on iframes (like Google Adsense or Facebook Like button).","main":"jquery.iframetracker.js","repository":{"type":"git","url":"https://github.com/vincepare/iframeTracker-jquery.git"},"keywords":["jquery-plugin","iframe","youtube","adsense","advertising","click"],"author":{"name":"Vincent Paré"},"license":"Apache-2.0","bugs":{"url":"https://github.com/vincepare/iframeTracker-jquery/issues"},"homepage":"https://github.com/vincepare/iframeTracker-jquery","gitHead":"56960ccf4bc600754348832e7e5fdc092e562d35","_id":"jquery.iframetracker@1.1.0","scripts":{},"_shasum":"ae52f9225ba9c38a51f528dee2d554e96d299d26","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"vincepare","email":"opensource@finalclap.com"},"maintainers":[{"name":"vincepare","email":"opensource@finalclap.com"}],"dist":{"shasum":"ae52f9225ba9c38a51f528dee2d554e96d299d26","tarball":"https://registry.npmjs.org/jquery.iframetracker/-/jquery.iframetracker-1.1.0.tgz","integrity":"sha512-uSBQsPfL7k/tvInk/5ew84N8Lv+LaV6bh54JBJt0sQukRmlqY7M3Pvf2shKzrh+tCLXGep0pvNRmwRkUEgS1aA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWKj1b1f/q8mCdAzot98iKqmtCSAVJda9B/dO5jIIR+wIgW4amcxWpsvmBcBENZSQeEoyBe4vVa0521k3mJR/Cuvs="}]},"directories":{}},"2.0.0":{"name":"jquery.iframetracker","version":"2.0.0","description":"jQuery Plugin to track click on iframes (like Google Adsense or Facebook Like button).","main":"dist/jquery.iframetracker.js","repository":{"type":"git","url":"git+https://github.com/vincepare/iframeTracker-jquery.git"},"keywords":["jquery-plugin","iframe","youtube","adsense","advertising","click"],"author":{"name":"Vincent Paré"},"license":"Apache-2.0","bugs":{"url":"https://github.com/vincepare/iframeTracker-jquery/issues"},"homepage":"https://github.com/vincepare/iframeTracker-jquery","scripts":{"test":"grunt eslint qunit","build":"grunt","prepare":"grunt"},"peerDependencies":{"jquery":">=1.4.4"},"devDependencies":{"eslint-config-jquery":"^1.0.1","grunt":"^1.0.1","grunt-contrib-copy":"^1.0.0","grunt-contrib-qunit":"^2.0.0","grunt-contrib-uglify":"^3.0.1","grunt-eslint":"^19.0.0","grunt-umd":"^2.4.0"},"gitHead":"50fee64495c2642db15e5ea3c9185ed062502bac","_id":"jquery.iframetracker@2.0.0","_npmVersion":"5.4.0","_nodeVersion":"6.10.3","_npmUser":{"name":"vincepare","email":"opensource@finalclap.com"},"maintainers":[{"name":"vincepare","email":"opensource@finalclap.com"}],"dist":{"integrity":"sha512-3VPH6TnaMGAwWSGBL2OpEkT3BJa8Wl5YVGV0nZlX/VOk4sCGupsSMG790+zn0t0Ov+HJl2ldyQD82H9FXcbKlA==","shasum":"dd604efdf8615df819860293b2302c696504394e","tarball":"https://registry.npmjs.org/jquery.iframetracker/-/jquery.iframetracker-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGMULXCXXwtJzMo61M5Cv6Bbb1aIPqq/xpMdsxm9O7+jAiARpMqM4qRaIvV7PSLaUaOteibcKuODss1P7X9J0br2+w=="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jquery.iframetracker-2.0.0.tgz_1515878244494_0.8510171980597079"},"directories":{}},"2.1.0":{"name":"jquery.iframetracker","version":"2.1.0","description":"jQuery Plugin to track click on iframes (like Google Adsense or Facebook Like button).","main":"dist/jquery.iframetracker.js","repository":{"type":"git","url":"git+https://github.com/vincepare/iframeTracker-jquery.git"},"keywords":["jquery-plugin","iframe","youtube","adsense","advertising","click"],"author":{"name":"Vincent Paré"},"license":"Apache-2.0","bugs":{"url":"https://github.com/vincepare/iframeTracker-jquery/issues"},"homepage":"https://github.com/vincepare/iframeTracker-jquery","scripts":{"test":"grunt eslint qunit","build":"grunt","prepare":"grunt"},"peerDependencies":{"jquery":">=1.4.4"},"devDependencies":{"eslint-config-jquery":"^1.0.1","grunt":"^1.0.1","grunt-contrib-copy":"^1.0.0","grunt-contrib-qunit":"^2.0.0","grunt-contrib-uglify":"^3.0.1","grunt-eslint":"^19.0.0","grunt-umd":"^2.4.0"},"gitHead":"492d10878b57dd851334c31a820f9a81cf74a712","_id":"jquery.iframetracker@2.1.0","_npmVersion":"5.4.0","_nodeVersion":"6.10.3","_npmUser":{"name":"vincepare","email":"opensource@finalclap.com"},"maintainers":[{"name":"vincepare","email":"opensource@finalclap.com"}],"dist":{"integrity":"sha512-GvaPCBv8Gvjx97HTGdYubVL9zXdDzCJRUN4270cZ6B6ITIX6XiyxoiYsJpHxW/mzwgcYMQstZUgcmTGce1EklQ==","shasum":"2d4dd1e01e174bb1f7921e9534c28b42847aa8fe","tarball":"https://registry.npmjs.org/jquery.iframetracker/-/jquery.iframetracker-2.1.0.tgz","fileCount":8,"unpackedSize":32051,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHWC88TAflU+z5KRHA5a0r3PWjtlo6vPuPFuXr06j0eWAiEA1gq0JsueEh/gROf82GdlqX0o7rDJyMMh6c0neLEgo+4="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jquery.iframetracker_2.1.0_1522103752011_0.5057444386889449"},"_hasShrinkwrap":false}},"readme":"iframeTracker jQuery Plugin\n===========================\niframeTracker is a jQuery plugin that allow to track clicks on iframes.\n\nThis is very useful to :\n\n - track clicks on Google Adsense (google uses iframes to display ads)\n - track clicks on Facebook Like buttons\n - track clicks on Youtube embed video player\n - ... and any other iframe !\n\nTry it now : [demo](https://cdn.rawgit.com/vincepare/iframeTracker-jquery/master/demo/index.html).\n\nHow does it work ?\n------------------\nSince it's impossible to read iframe content (DOM) from the parent page due to the [same origin policy](http://en.wikipedia.org/wiki/Same-origin_policy), tracking is based on the blur event associated to a **page/iframe boundary monitoring system** telling over which iframe is the mouse cursor at any time.\n\nHow to use ?\n------------\nMatch the iframe elements you want to track with a jQuery selector and call `iframeTracker` with a callback function that will be called when a click on the iframe is detected :\n\n```javascript\njQuery(document).ready(function($){\n\t$('.iframe_wrap iframe').iframeTracker({\n\t\tblurCallback: function(event) {\n\t\t\t// Do something when the iframe is clicked (like firing an XHR request)\n\t\t}\n\t});\n});\n```\n\nYou can also just pass a function, that will be then registered as the `blurCallback` :\n\n```javascript\njQuery(document).ready(function($){\n\t$('.iframe_wrap iframe').iframeTracker(function(event) {\n\t\t// Do something when the iframe is clicked (like firing an XHR request)\n\t});\n});\n```\n\n### Advanced tracking\n\n```javascript\njQuery(document).ready(function($){\n\t$('.iframe_wrap iframe').iframeTracker({\n\t\tblurCallback: function(event) {\n\t\t\t// Do something when iframe is clicked (like firing an XHR request)\n\t\t\t// You can know which iframe element is clicked via this._overId\n\t\t},\n\t\toverCallback: function(element, event) {\n\t\t\tthis._overId = $(element).parents('.iframe_wrap').attr('id'); // Saving the iframe wrapper id\n\t\t},\n\t\toutCallback: function(element, event) {\n\t\t\tthis._overId = null; // Reset hover iframe wrapper id\n\t\t},\n\t\t_overId: null\n\t});\n});\n```\n\n#### Cancel tracking\nYou can remove a tracker attached to an iframe by calling `.iframeTracker()` with either `false` or `null` :\n```javascript\n$('#iframe_red_1 iframe').iframeTracker(false);\n$('#iframe_red_2 iframe').iframeTracker(null);\n```\n\nFull tutorial available [here](http://www.finalclap.com/tuto/track-iframe-click-jquery-87/) (it's in French).\n\nTested on jQuery `1.4.4` to `1.11.0`, `2.1.4`  & `3.2.1`.\n\n----------\n\n### Install\nWith npm :\n```bash\nnpm install jquery.iframetracker\n```\n\nWith bower :\n```bash\nbower install jquery.iframetracker\n```\n\n### About mobile devices\nThis plugin doesn't work on mobile devices such as smartphones and tablets, because this hardware uses a touchscreen instead of a mouse as click input. This design makes the boundary monitoring trick ineffective.\n\n### Donate\nDonations are welcome :) via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=YXDJFGF8GCGLA&item_name=Vincent%20Par%e9%20-%20www.finalclap.com&item_number=iframeTracker%2dgithub&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted), [Flattr](https://flattr.com/submit/auto?user_id=finalclap&url=https://github.com/vincepare/iframeTracker-jquery&title=iframeTracker%20jQuery%20Plugin&language=&tags=github&category=software) or Bitcoin at this address : `3G5uTti2JPAT738uDeQXjrN7tUj2NZjt6M` or by flashing this lovely QR code :\n\n![qrcode for bitcoin address 3G5uTti2JPAT738uDeQXjrN7tUj2NZjt6M](https://vincepare.github.io/img/qrcode-bitcoin-3G5uTti2JPAT738uDeQXjrN7tUj2NZjt6M.png)\n","maintainers":[{"name":"vincepare","email":"opensource@finalclap.com"}],"time":{"modified":"2022-06-19T05:20:43.214Z","created":"2014-12-29T18:20:27.922Z","1.0.4":"2014-12-29T18:20:27.922Z","1.0.5":"2015-06-17T23:15:40.919Z","1.1.0":"2015-06-20T15:38:45.403Z","2.0.0":"2018-01-13T21:17:25.649Z","2.1.0":"2018-03-26T22:35:52.356Z"},"homepage":"https://github.com/vincepare/iframeTracker-jquery","keywords":["jquery-plugin","iframe","youtube","adsense","advertising","click"],"repository":{"type":"git","url":"git+https://github.com/vincepare/iframeTracker-jquery.git"},"author":{"name":"Vincent Paré"},"bugs":{"url":"https://github.com/vincepare/iframeTracker-jquery/issues"},"license":"Apache-2.0","readmeFilename":"README.md"}