=== Blunt GA === Contributors: Hube2 Tags: google, google analytics, analytics, event tracking, tracking, events Requires at least: 2.6 Tested up to: 3.5 Stable tag: 1.2.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Installs GA on site. Event tracking of outbound, email, click to call and document links. Form Tracking. Conversion Tracking. Cross site Tracking. == Description == This plugin installs Google Analytics (GA). It can be uset to set up event tracking of document, file, email, click to call and outbound links. Form submission event tracking can be set up. Event tracking can be added to all conversion pages. Cross Site tracking and linking can also be set up. *See the "Other Notes" Section for details on use.* == Installation == **Important: You must disable automatic installation of Google Analytics code in any other plugin that includes the ability to do so AND/OR Remove all other GA code from your site/theme/template files.** 1. Upload the Blunt GA plugin to the plugin folder of your site 2. Activate it from the Plugins Page 3. Open the settings page and enter your Google Analytics Account # and set other settings. The link to the settings page is located under Settings in the main wp-admin menu *See the "Other Notes" Section details on use.*. == Screenshots == 1. Shows location of link to Blunt GA Settings page 2. Shows settings page with basic settings section 3. Shows Outbound Link Tracking section of settings 4. Shows Email Link Tracking section of settings 5. Shows Document/File Link Tracking section of settings 6. Shows Anchor Link Tracking section of settings 7. Shows Form Submission Tracking section of settings 8. Shows Conversion Tracking section of settings 9. Shows Cross Site Tracking section of setting == Documentation == ####Basic Settings#### **Google Analytics Account** This is your GA Account number. You can get this by logging into your Google Analytics Admin. Your account number should be in the form of "UA-8765432-1" ####Outbound Link Tracking#### Outbound links are all links that leave your site and go to someone elses site. Tracking outbound links allows you to see where visitors are leaving your site. Enabling outbound link tracking adds an event to all outbound links. **Tracking Method** A detailed explanation of tracking methods will be discussed here. This explanation applies to all areas where different trackin methods can be used. The only change will be some of the details about what the events will look like in when viewing them in you Google Analytics reports. **Track as Event** Tracking as events is the default setting for all sections. A detailed explanation of event tracking can be found here: https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide When you set tracking to track as events it is the same as adding the following to all the links of the type _trackEvent(category, action, opt_label, opt_value, opt_noninteraction) The category is the only option that can be set by the user. All other values sent for the event are hard coded at this time. For outbound links, the other values sent to Google for the event are: * action = The URL of the exernal link (for example http://wordpress.org/) * opt_label = The Current Page URL: (for example, if the link the visitor clicked is located at http://www.yoursite.com/about-us.html then the label will be /about-us.html * opt_value = 0 (zero) * opt_noninteraction = false **Track as Virtual Page View** Tracking events as virtual page views is the way that tracking of this kind was accomplished before Google added Event Tracking. This will add a page view to your reports. For Outbound Link Tracking the page url that will be added will look like the following: /THE_CATEGORY/?action=THE_ACTION&label=THE_LABEL * THE_CATEGORY = the category that you set for the section * THE_ACTION = the action as given under event tracking above * THE LABEL = the lable as given under evetn tracking above **GA Event Category** This is the category you want outbound links to be tracked as. This value can include letters, numbers, hyphens (-) and underscores (_). This should be a descriptive label that sets these events apart from other events. **Open in New Window** As an added bonus, you can have Blunt GA automatically open outbound links in a new browser window or tab, depending on the visitors browser. ####Mailto Link Tracking#### Mailto links are links to email addresses and normally appear something like: <a href="mailto:youremailaddress@somewhere.com">email me</a> **Tracking Method** See detailed explanation of tracking methods under Outbound Link Tracking above For mailto links, the other values sent to Google for the event are: * action = the email address that is being linked (example: youremailaddress@somewhere.com) * opt_label = The Current Page URL * opt_value = 0 (zero) * opt_noninteraction = false For tracking as virtual page views the format is identical to what is given under Outbound Link Tracking ####Click to Call Link Tracking#### New in Verstion 1.2.0 Click to call links are links that are for telephone numbers example: <a href="tel:+18005551212">800-555-1212</a> Please not that this plugin does not add click to call links to telephone numbers on your pages. This plugin only adds GA tracking to links that already exist. **Tracking Method** See detailed explanation of tracking methods under Outbound Link Tracking above For click to call links, the other values sent to Google for the event are: * action = the phone number that is being linked (example: 18005551212) * opt_label = The Current Page URL * opt_value = 0 (zero) * opt_noninteraction = false For tracking as virtual page views the format is identical to what is given under Outbound Link Tracking ####Document/File Link Tracking#### Documents and files are all files on your site that are not considered web pages that GA code can normally be installed, for example, pdf files or word documents. **Tracking Method** See detailed explanation of tracking methods under Outbound Link Tracking above For document/file links, the other values sent to Google for the event are: * action = the document or file url that is being linked (example: /mydocuments/catalog.pdf) * opt_label = The Current Page URL * opt_value = 0 (zero) * opt_noninteraction = false For tracking as virtual page views the format is identical to what is given under Outbound Link Tracking **Document Extensions to Track** Enter a comma seperated list of all file extensions that should be considered document/file links and should have events added to their links. ####Anchor Link Tracking#### Anchor links are links within a page and similar to: <a href="#section2">Section 2</a> **Tracking Method** See detailed explanation of tracking methods under Outbound Link Tracking above For mailto links, the other values sent to Google for the event are: * action = The Anchor that is being linked * opt_label = The Current Page URL * opt_value = 0 (zero) * opt_noninteraction = false For tracking as virtual page views the format is identical to what is given under Outbound Link Tracking ####Form Submission Tracking#### Form submmision tracking will record events for every time a form is submitted on your site. However, this does not tell you if the form submission was successful or not, only that the form was submitted. The data that can be collected by detecting that forms are submitted is questionable and for an accurate indication of forms that are submitted successfully, conversion tracking (below) is a better alternative. This could be usefull, however, for forms that submit to an external site. For example, if you have a newsletter signup for a newsletter provided be a third party, you could track these submission. **Tracking Method** See detailed explanation of tracking methods under Outbound Link Tracking above For form submission tracking, the other values sent to Google for the event are: * action = The name attribute value of the form being submitted. If there is no value for the name attribute of the form then the form number will be given instead. Forms are numbered by the browser in the same order they appear in the HTML of the page. The fist form on the page is #0 (zero) * opt_label = The label include the URL of the page where the form is located as well as the URL where the form will be submitted to. If the form is submitted to the same page it is on then the "To" value will be set to "same" * opt_value = 0 (zero) * opt_noninteraction = false For tracking as virtual page views the format is identical to what is given under Outbound Link Tracking ####Conversion Tracking#### Conversion tracking allows you to specify a list of pages that you consider "Conversion" pages. The only way that a visitor can reach the pages is by performing some action, for example; successfully submitting a form. **Tracking Method** See detailed explanation of tracking methods under Outbound Link Tracking above For conversion tracking, the other values sent to Google for the event are: * action = "conversion" * opt_label = The label for conversion pages will appear in query string format (Page=**CONVERSION_PAGE**&From=**REFERER**). **CONVERSION_PAGE** is the current page and **REFERER** is the page where the form submission occured, or the page that sent the visitor to the current page. * opt_value = 0 (zero) * opt_noninteraction = false For tracking as virtual page views the format is identical to what is given under Outbound Link Tracking **Conversion Pages** Enter each page that is to be considered a conversion page on a seperate line. The URL for each page should be relative from the root of your website. An example of some conversion pages: * /thank-you.html * /contant-us/thank-you/ **Added in Version 1.1.0** Conversion pages may also be in the form of an anchor hash (examples: #converted, #thank-you). The hash (#) Must be the first character. All URLs that have the anchor will be considered a conversion no matter what appears before the anchor. **Anchor Tracking must be Enabled to use anchor conversion pages** **Important Note: ** if you have a conversion page also set as a goal in GA then you should track conversions as events and not virtual page views. If you track the conversion as a virtual page view then you will most likely end up recording these goals twice. ####Cross Site Tracking#### Cross site tracking gives you the ability to track your site under the same GA account as another site. For example, if you have a main site that is www.MyMainSite.com and you have a related site or sites, for example www.mySecondSite.com or blog.MyMainSite.com, rather than track each site seperately you can track all page views as if they are located at www.MyMainSite.com. When using Cross Site Tracking, the GA Account # that you user for your site should be that of you're main site. **Cross Site Domain** This is the domain name that your site should be tracked as. This value is required to enable Cross Site Tracking. https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite **Cross Site Prefix** Adding a cross site prefix to pages of your site enables you to tell on what site a page is actually located. For example, if you have two sites and both of these sites have an "About Us" page with identicaly URIs (http://www.myMainSite.com/about-us.html and http://www.mySecondSite.com/about-us.html) then views of both pages will be recorded together in your GA reports (/about-us.html). However, if you add a prefix to the pages of the second site, then these page views will be tracked seperately. The page prefix can contain letters, numbers, underscores (_), hyphens (-) and dots (.) and it will be prepended to all URI's for the site. Examples: * /my-second-site/about-us.html * /store/about-us.html * /blog/about-us.html * /www.mysecondsite.com/about-us.html **Enable Cross Site Linking** Normally, cookies are not shared across domains, even with cross site tracking enabled. However, it is possible to share tracking information by enabling cross site linking. With cross site linking enabled, JavaScript it used to load a page from a linked site and tranfer cookie information to the second site. Cross site tracking allows for the continuous tracking of the visitors session across all linked domains. *Cross site tracking must be enabled in order to enable cross site linking.* *Important Note: Enabling Cross Site Linking will disable the ability to open links in a new window or tab for outbound links that are for a linked domain.* **Enable Cross Site Linking Events** Normally, when cross site linking is used outbound link events will not be sent. If you would like to send these events anyway so that you can track them then enable this setting. **Cross Site Domains** Enter a list of all sites that should be linked together, one domain per line. This list must have at least one domain and the domain entered for **Cross Site Domain** will automatically be included. == Changelog == = 1.2.2 = * Added minimized version of JavaScript file, reduced js size by 15K = 1.2.1 = * Fixed a bug that caused update to version 1.2.0 to revert all settings to defaults = 1.2.0 = * Added Click to Call Tracking * Notes added to documentation about Click to Call Tracking * Removed JavaScript Compression = 1.1.0 = * Fixed a bug that caused failure if only anchor tracking was enabled * Added ability to track anchors as conversion pages * Turning on anchor tracking now adds anchor hash to all page views * Notes added to documentation about changes to anchor and conversion tracking = 1.0.0 = * initial release as a WordPress Plugin