微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

gaTracker

程序名称:gaTracker

授权协议: 未知

操作系统: 未知

开发语言:

gaTracker 介绍

This plugin is intended to simplify the process of adding Google Analytics
tracking to a page, including the tracking of outbound links, mailtos, and
downloads, which are not otherwise tracked by default. Calling the plugin does
the following:

  • Determine whether to include the SSL or non-SSL version of the GA script.
  • Include the GA script (currently urchin.js, while ga.js is still in beta testing) from within try/catch to help suppress any issues GA may have from time to time.
  • Set the _uacct variable to your GA tracking code.
  • Call the urchinTracker() function once for the initial page load.
  • examine all of the links on the page and attach onclick events to external links, mailto links, and downloads.
  • Call urchinTracker() when these links are clicked, prefixing them appropriately.

In addition to the tracking code, the prefixes used for each of the link types
above, as well as the extensions considered “downloadable files” are
configurable by the user.

It requires jQuery 1.2 or higher for the cross-domain $.getScript() call.
Usage is simply:

$.gaTracker('UA-XXXXX-XX');

Or you can specify options like so:

$.gaTracker( 'UA-XXXXX-XX', { external: '/external/', [mailto: ](mailto:         "mailto:        ") '/mailto/', download: '/downloads/', extensions: [ 'pdf','doc','xls','csv','jpg','gif', 'mp3', 'swf','txt','ppt','zip','gz','dmg','xml' ] } );

gaTracker 官网

http://plugins.jquery.com/project/gaTracker

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐